Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Rework support for --allow-hosts / --index-url #30

Conversation

benoit-pierre
Copy link
Contributor

As a prerequisite for pypa/setuptools#1127, don't rely on patching setuptools.Distribution's private member: _egg_fetcher.

Note: this PR also include a fix for a bug I found while adding some tests to prevent regressions: extras with no environment marker are not installed when using --extras.

Correctly install extras with no markers.
Don't rely on patching `setuptools.Distribution`'s private member: `_egg_fetcher`.
ptr.py Outdated
and (not name or self.extras)
if (not name or self.extras)
# never include extras that fail to pass marker eval
and (not marker or self.marker_passes(marker))
Copy link
Contributor

Choose a reason for hiding this comment

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

I meant for self.marker_passes to encapsulate the full check. I think I want to fix the bug there. Was there a reason you switched the order of these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just seemed more natural to me when I looked at fixing the conditions: first filter on the name, then check the condition.

@jaraco
Copy link
Contributor

jaraco commented Sep 3, 2017

I like this approach. The factoring out of the CustomDistribution was precisely the right thing to do. The py26 support is annoying, I know. I think I'll drop support for Python 2.6 after getting this fix out.

And thanks for adding tests. I'd always felt like it would be too difficult to write tests for this library because of the complications with test runners, etc, but you've done it. Kudos!

I've repeatedly run into issues with my boolean logic in the markers handling stuff. I'm surprised it's worked well enough for all this time without complaints. Glad to have tests to verify the behavior now.

@jaraco jaraco merged commit ac7c1ae into pytest-dev:master Sep 3, 2017
@benoit-pierre benoit-pierre deleted the rework_support_for_--allow-hosts/--index-url branch September 7, 2017 12:35
jaraco added a commit that referenced this pull request Feb 12, 2021
* Replace pep517.build with build

Resolves #30

* Prefer simple usage

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
jaraco added a commit that referenced this pull request Feb 12, 2021
* Use `extend-ignore` in flake8 config

This option allows to add extra ignored rules to the default list
instead of replacing it.

The default exclusions are: E121, E123, E126, E226, E24, E704,
W503 and W504.

Fixes #28.

Refs:
* https://github.com/pypa/setuptools/pull/2486/files#r541943356
* https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore
*
https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore

* Enable complexity limit. Fixes jaraco/skeleton#34.

* Replace pep517.build with build (#37)

* Replace pep517.build with build

Resolves #30

* Prefer simple usage

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Use license_files instead of license_file in meta (#35)

Singular `license_file` is deprecated since wheel v0.32.0.

Refs:
* https://wheel.readthedocs.io/en/stable/news.html
* https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants