diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 23:51:45 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-10 23:51:45 -0500 |
| commit | 271dee89e1ec9740c008f1938aa896616e164ede (patch) | |
| tree | ad3a49724d6999c64db3be29bf4c95930fcd262a /pkg_resources | |
| parent | cdf2cc4a521d05ad76aa96cb37504cdb9f824c2a (diff) | |
| download | python-setuptools-git-271dee89e1ec9740c008f1938aa896616e164ede.tar.gz | |
Perform marker calculation in one step
Diffstat (limited to 'pkg_resources')
| -rw-r--r-- | pkg_resources/__init__.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 1d8d88c8..062b82c6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2697,12 +2697,12 @@ class Distribution(object): new_extra = extra reqs = dm.pop(extra) new_extra, _, marker = extra.partition(':') - if marker: - if invalid_marker(marker): - # XXX warn - reqs = [] - elif not evaluate_marker(marker): - reqs = [] + fails_marker = marker and ( + invalid_marker(marker) + or not evaluate_marker(marker) + ) + if fails_marker: + reqs = [] new_extra = safe_extra(new_extra) or None dm.setdefault(new_extra, []).extend(reqs) |
