Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
00a738d4
Commit
00a738d4
authored
Jul 23, 2017
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle rebuild of install_requires separate from building extras"
parent
81ffba70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
setuptools/dist.py
setuptools/dist.py
+12
-7
No files found.
setuptools/dist.py
View file @
00a738d4
...
...
@@ -380,15 +380,21 @@ class Distribution(Distribution_parse_config_files, _Distribution):
Move requirements in `install_requires` that are using environment
markers or extras to `extras_require`.
"""
install_requires = []
spec_inst_reqs = getattr(self, '
install_requires
', None) or ()
for r in pkg_resources.parse_requirements(spec_inst_reqs):
self.install_requires = list(
str(req)
for req in pkg_resources.parse_requirements(spec_inst_reqs)
if not req.marker and not req.extras
)
markers_or_extras_reqs = (
req
for req in pkg_resources.parse_requirements(spec_inst_reqs)
if req.marker or req.extras
)
for r in markers_or_extras_reqs:
marker = r.marker
extras = r.extras
if not marker and not extras:
install_requires.append(r)
continue
r.extras = ()
r.marker = None
for section in extras or ('',):
...
...
@@ -399,7 +405,6 @@ class Distribution(Distribution_parse_config_files, _Distribution):
(k, [str(r) for r in v])
for k, v in self._tmp_extras_require.items()
)
self.install_requires = [str(r) for r in install_requires]
def parse_config_files(self, filenames=None):
"""Parses configuration files from various levels
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment