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

Conda skeleton does not support environment markers #1974

Closed
evhub opened this issue May 1, 2017 · 2 comments · Fixed by #1984
Closed

Conda skeleton does not support environment markers #1974

evhub opened this issue May 1, 2017 · 2 comments · Fixed by #1984
Labels
locked [bot] locked due to inactivity

Comments

@evhub
Copy link
Contributor

evhub commented May 1, 2017

PEP 508 added support for environment markers in PyPI version specifications. Specifically, environment markers allow you to have versions like (example on PyPI here)

pygments<2.3,>=2.2;python_version>='2.7'
prompt-toolkit<1.1,>=1.0;python_version>='2.7'
futures<3.1,>=3.0;python_version<'3'
argparse<1.5,>=1.4;python_version<'2.7'

where the package on the left is only a dependency if the current Python version meets the requirement on the right. This is a very useful feature for packages that aim to support multiple Python versions.

However, when conda skeleton pypi creates meta.yaml, it does not respect the environment markers, leaving any dependencies with environment markers completely out of the dependency structure. Thus, when one runs conda build on such a skeleton, it fails with (full error at evhub/coconut#246)

RuntimeError: Setuptools downloading is disabled in conda build. Be sure to add all dependencies in the meta.yaml

since setuptools tries to respect the environment markers, but conda won't let it.

This is a major problem for packages that use environment markers in their dependencies. It'd be great if this could be fixed, but until then, do you have any ideas for a suitable workaround?

@msarahan
Copy link
Contributor

msarahan commented May 2, 2017

I think selectors are the nearest concept in conda-build: https://conda.io/docs/building/meta-yaml.html#preprocessing-selectors

Adding translation of environment markers to selectors to the skeleton generator is definitely desirable, but I don't think I'll be able to get to it any time soon. PRs welcome - and I'd be happy to answer any questions if anyone wants to tackle it.

evhub added a commit to evhub/conda-build that referenced this issue May 3, 2017
evhub added a commit to evhub/conda-build that referenced this issue May 3, 2017
@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants