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

Fix extras_require and environment markers in sdist #2153

Merged
merged 4 commits into from
Dec 20, 2014

Conversation

xavfernandez
Copy link
Member

Currently, environment markers in extras_require (e.g. {':python_version=="2.6"': ['unittest2']}) in sdist do not work.
The plan is to use pkg_resources.Distribution which will give it for free.

First commit is to make sure we do not put editable_options in extras (parse_editable return types are currently merging the two).

@xavfernandez xavfernandez force-pushed the xfernandez/extras_fix branch 2 times, most recently from 23a5e6d to 0d150e3 Compare December 12, 2014 17:23
@xavfernandez xavfernandez changed the title WIP: fix extras_require and environment markers in sdist Fix extras_require and environment markers in sdist Dec 12, 2014
@xavfernandez
Copy link
Member Author

Fixes issue #2174

@msabramo
Copy link
Contributor

Still "Work In Progress" or ready for review? You removed WIP from title but not from initial comment. Probably an oversight?

@xavfernandez
Copy link
Member Author

Ready for review :)

@xavfernandez
Copy link
Member Author

Remove now useless InstallRequirement.requirements method

@dstufft dstufft added this to the 6.0 milestone Dec 17, 2014
@@ -412,67 +412,45 @@ def prepare_files(self, finder):
# ###################### #
# # parse dependencies # #
# ###################### #
if (req_to_install.extras):
logger.info(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this here, at the very least it should be logger.debug not logger.info.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it was there for sdist so I've added it for wheel also.
But I'm ok to switch it to debug or remove it completely since the extras is likely to have been already logged through the req_install before.

@dstufft
Copy link
Member

dstufft commented Dec 18, 2014

Overall I think this looks good. I made one comment and I'd like to look at it again tomorrow morning before merging but I think this can land.

extras and editable_options are two different things
use pkg_resources.Distribution.requires instead of
Requirements.requirements to have environment markers parsing for free
It also unifies a little the process for wheel and non-wheel installs

closes pypa#2174
and use pkg_resources.Distribution instead
@xavfernandez
Copy link
Member Author

@dstufft I switched the logging to debug. Did you spot any other issue ?

dstufft added a commit that referenced this pull request Dec 20, 2014
Fix extras_require and environment markers in sdist
@dstufft dstufft merged commit 517dbb9 into pypa:develop Dec 20, 2014
@xavfernandez xavfernandez deleted the xfernandez/extras_fix branch December 21, 2014 12:43
@qwcode
Copy link
Contributor

qwcode commented Dec 23, 2014

some nice cleanup in here!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants