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
abaf7c4d
Commit
abaf7c4d
authored
Apr 07, 2017
by
Marcel Bargull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #999: support python_requires, py_modules in configuration files
parent
bdbe0776
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
1 deletion
+10
-1
docs/setuptools.txt
docs/setuptools.txt
+2
-0
setuptools/config.py
setuptools/config.py
+1
-0
setuptools/dist.py
setuptools/dist.py
+3
-1
setuptools/tests/test_config.py
setuptools/tests/test_config.py
+4
-0
No files found.
docs/setuptools.txt
View file @
abaf7c4d
...
...
@@ -2425,6 +2425,7 @@ zip_safe bool
setup_requires list-semi
install_requires list-semi
extras_require section
python_requires str
entry_points file:, section
use_2to3 bool
use_2to3_fixers list-comma
...
...
@@ -2440,6 +2441,7 @@ package_dir dict
package_data section
exclude_package_data section
namespace_packages list-comma
py_modules list-comma
======================= =====
.. note::
...
...
setuptools/config.py
View file @
abaf7c4d
...
...
@@ -462,6 +462,7 @@ class ConfigOptionsHandler(ConfigHandler):
'tests_require'
:
parse_list_semicolon
,
'packages'
:
self
.
_parse_packages
,
'entry_points'
:
self
.
_parse_file
,
'py_modules'
:
parse_list
,
}
def
_parse_packages
(
self
,
value
):
...
...
setuptools/dist.py
View file @
abaf7c4d
...
...
@@ -166,7 +166,7 @@ def check_specifier(dist, attr, value):
packaging
.
specifiers
.
SpecifierSet
(
value
)
except
packaging
.
specifiers
.
InvalidSpecifier
as
error
:
tmpl
=
(
"{attr!r} must be a string
or list of strings
"
"{attr!r} must be a string "
"containing valid version specifiers; {error}"
)
raise
DistutilsSetupError
(
tmpl
.
format
(
attr
=
attr
,
error
=
error
))
...
...
@@ -353,6 +353,8 @@ class Distribution(Distribution_parse_config_files, _Distribution):
_Distribution.parse_config_files(self, filenames=filenames)
parse_configuration(self, self.command_options)
if getattr(self, '
python_requires
', None):
self.metadata.python_requires = self.python_requires
def parse_command_line(self):
"""Process features after parsing command line options"""
...
...
setuptools/tests/test_config.py
View file @
abaf7c4d
...
...
@@ -312,6 +312,8 @@ class TestOptions:
'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there
\
n
'
'dependency_links = http://some.com/here/1, '
'http://some.com/there/2
\
n
'
'python_requires = >=1.0, !=2.8
\
n
'
'py_modules = module1, module2
\
n
'
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
dist
.
zip_safe
...
...
@@ -340,6 +342,8 @@ class TestOptions:
'there'
])
assert
dist
.
tests_require
==
[
'mock==0.7.2'
,
'pytest'
]
assert
dist
.
python_requires
==
'>=1.0, !=2.8'
assert
dist
.
py_modules
==
[
'module1'
,
'module2'
]
def
test_multiline
(
self
,
tmpdir
):
fake_env
(
...
...
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