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

Capability of using <, <=, > in the requirements and their combination #12

Closed
wkentaro opened this issue Apr 28, 2018 · 3 comments
Closed

Comments

@wkentaro
Copy link

wkentaro commented Apr 28, 2018

It seems that this block restricts the use of these operations, and with their combination (ex. numpy>2,<=2.3) looks difficult in the merge.
(And also there can be a case of -e git+https://XXXXXXX.git#egg=YYY.)

Do you have plan and idea how to add them?

@wkentaro
Copy link
Author

And I'd like to know what made you to use multiple requirements.txt files, and their combination:

add_custom_command(OUTPUT ${generated_requirements}
COMMAND ${CATKIN_ENV} ${PYTHON_EXECUTABLE} ${catkin_virtualenv_CMAKE_DIR}/combine_requirements.py --requirements-list ${requirements_list} --output-file ${generated_requirements}
DEPENDS ${requirements_list}
)

@paulbovbel
Copy link
Member

What motivated me to use multiple requirements files was the idea that you could have:

  • package A implement library code that depends on external library B
  • package C on package A, and inherit package A's requirement of library B transparently

I agree, the current implementation is fairly limited. It would certainly be possible to add support for other combination of constraints here.

  • The combinatorial explosion would probably require taking a different approach than currently used
  • A cleaner way would probably be to rely on the ability of requirements files to recursively include requirements files, letting pip/setuptools handle the messy resolution.

@paulbovbel
Copy link
Member

paulbovbel commented May 1, 2018

That was fairly easy, and I got to remove a bunch of code! #15

EDIT: closing the associated PR, not a good strategy. A better requirement-constraint-merging strategy should be implemented in catkin_virtualenv, unless pip changes the way it works with duplicated requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants