Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add range-v3 #7824

Open
allanleal opened this issue Feb 21, 2019 · 2 comments
Open

Add range-v3 #7824

allanleal opened this issue Feb 21, 2019 · 2 comments

Comments

@allanleal
Copy link
Contributor

Adding the range-v3 library to conda-forge would be very welcome. Example:

using namespace ranges;

std::vector<int> vi{1,2,3,4,5,6,7,8,9,10};
auto rng = vi | view::remove_if([](int i){return i % 2 == 1;})
              | view::transform([](int i){return std::to_string(i);});
// rng == {"2","4","6","8","10"};

I can help as much as possible, but currently not very familiar with the entire process.

https://github.com/ericniebler/range-v3
https://ericniebler.github.io/range-v3/

@stuarteberg
Copy link
Contributor

@allanleal

I can help as much as possible, but currently not very familiar with the entire process.

Since range-v3 is a header-only library, it shouldn't be too hard to get it into conda-forge. The basic procedure is to clone this repo (staged recipes), and create a new directory in the recipes directory:

staged-recipes/
  recipes/
    example/   # Don't delete the example
      meta.yaml
    range-v3/  # add this one
      meta.yaml
      build.sh
      bld.bat

As for the contents of meta.yaml, build.sh, and bld.bat, you can try looking at another recipe as an example. For instance xtensor is a header-only C++ library, so its recipe in the xtensor-feedstock would be a good place to look.

(Although it's header-only, their build.sh script still uses cmake and make install rather than a simple "install" command like cp -R include/* ${PREFIX}/include. I guess that's because they want to install the cmake modules that makes it easier for other cmake-based projects to use xtensor.)

Anyway, test your recipe with conda build staged-recipes/range-v3, and then submit a pull request here with your changes.

@bluescarni
Copy link
Contributor

I have a PR up for this: #22443.

@bluescarni bluescarni mentioned this issue Mar 31, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants