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
5ce9e5f3
Commit
5ce9e5f3
authored
Jan 19, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
👹
Feed the hobgoblins (delint).
parent
313ac58f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
51 additions
and
51 deletions
+51
-51
docs/conf.py
docs/conf.py
+4
-4
setuptools/__init__.py
setuptools/__init__.py
+2
-2
setuptools/command/build_clib.py
setuptools/command/build_clib.py
+15
-15
setuptools/dist.py
setuptools/dist.py
+1
-1
setuptools/msvc.py
setuptools/msvc.py
+1
-1
setuptools/tests/__init__.py
setuptools/tests/__init__.py
+1
-1
setuptools/tests/test_build_clib.py
setuptools/tests/test_build_clib.py
+1
-2
setuptools/tests/test_config.py
setuptools/tests/test_config.py
+3
-3
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+13
-13
setuptools/tests/test_setuptools.py
setuptools/tests/test_setuptools.py
+4
-4
setuptools/tests/test_wheel.py
setuptools/tests/test_wheel.py
+6
-5
No files found.
docs/conf.py
View file @
5ce9e5f3
...
...
@@ -64,10 +64,10 @@ html_use_index = False
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author,
# documentclass [howto/manual]).
latex_documents
=
[
(
'index'
,
'Setuptools.tex'
,
'Setuptools Documentation'
,
'The fellowship of the packaging'
,
'manual'
)
,
]
latex_documents
=
[
(
'index'
,
'Setuptools.tex'
,
'Setuptools Documentation'
,
'The fellowship of the packaging'
,
'manual'
,
)
]
link_files
=
{
'../CHANGES.rst'
:
dict
(
...
...
setuptools/__init__.py
View file @
5ce9e5f3
...
...
@@ -191,8 +191,8 @@ class Command(_Command):
ok
=
False
if
not
ok
:
raise
DistutilsOptionError
(
"'%s' must be a list of strings (got %r)"
%
(
option
,
val
))
"'%s' must be a list of strings (got %r)"
%
(
option
,
val
))
def
reinitialize_command
(
self
,
command
,
reinit_subcommands
=
0
,
**
kw
):
cmd
=
_Command
.
reinitialize_command
(
self
,
command
,
reinit_subcommands
)
...
...
setuptools/command/build_clib.py
View file @
5ce9e5f3
...
...
@@ -25,9 +25,9 @@ class build_clib(orig.build_clib):
sources
=
build_info
.
get
(
'sources'
)
if
sources
is
None
or
not
isinstance
(
sources
,
(
list
,
tuple
)):
raise
DistutilsSetupError
(
"in 'libraries' option (library '%s'), "
"'sources' must be present and must be "
"a list of source filenames"
%
lib_name
)
"in 'libraries' option (library '%s'), "
"'sources' must be present and must be "
"a list of source filenames"
%
lib_name
)
sources
=
list
(
sources
)
log
.
info
(
"building '%s' library"
,
lib_name
)
...
...
@@ -38,9 +38,9 @@ class build_clib(orig.build_clib):
obj_deps
=
build_info
.
get
(
'obj_deps'
,
dict
())
if
not
isinstance
(
obj_deps
,
dict
):
raise
DistutilsSetupError
(
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
dependencies
=
[]
# Get the global dependencies that are specified by the '' key.
...
...
@@ -48,9 +48,9 @@ class build_clib(orig.build_clib):
global_deps
=
obj_deps
.
get
(
''
,
list
())
if
not
isinstance
(
global_deps
,
(
list
,
tuple
)):
raise
DistutilsSetupError
(
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
# Build the list to be used by newer_pairwise_group
# each source will be auto-added to its dependencies.
...
...
@@ -60,16 +60,16 @@ class build_clib(orig.build_clib):
extra_deps
=
obj_deps
.
get
(
source
,
list
())
if
not
isinstance
(
extra_deps
,
(
list
,
tuple
)):
raise
DistutilsSetupError
(
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
"in 'libraries' option (library '%s'), "
"'obj_deps' must be a dictionary of "
"type 'source: list'"
%
lib_name
)
src_deps
.
extend
(
extra_deps
)
dependencies
.
append
(
src_deps
)
expected_objects
=
self
.
compiler
.
object_filenames
(
sources
,
output_dir
=
self
.
build_temp
)
sources
,
output_dir
=
self
.
build_temp
,
)
if
(
newer_pairwise_group
(
dependencies
,
expected_objects
)
...
...
setuptools/dist.py
View file @
5ce9e5f3
...
...
@@ -162,7 +162,7 @@ def write_pkg_file(self, file):
if
self
.
download_url
:
write_field
(
'Download-URL'
,
self
.
download_url
)
for
project_url
in
self
.
project_urls
.
items
():
write_field
(
'Project-URL'
,
'%s, %s'
%
project_url
)
write_field
(
'Project-URL'
,
'%s, %s'
%
project_url
)
long_desc
=
rfc822_escape
(
self
.
get_long_description
())
write_field
(
'Description'
,
long_desc
)
...
...
setuptools/msvc.py
View file @
5ce9e5f3
...
...
@@ -544,7 +544,7 @@ class SystemInfo:
# Except for VS15+, VC version is aligned with VS version
self.vs_ver = self.vc_ver = (
vc_ver or self._find_latest_available_vs_ver())
vc_ver or self._find_latest_available_vs_ver())
def _find_latest_available_vs_ver(self):
"""
...
...
setuptools/tests/__init__.py
View file @
5ce9e5f3
...
...
@@ -6,7 +6,7 @@ from setuptools.extern.six import PY2, PY3
__all__
=
[
'fail_on_ascii'
,
'py2_only'
,
'py3_only'
'fail_on_ascii'
,
'py2_only'
,
'py3_only'
]
...
...
setuptools/tests/test_build_clib.py
View file @
5ce9e5f3
...
...
@@ -8,8 +8,7 @@ from setuptools.dist import Distribution
class
TestBuildCLib
:
@
mock
.
patch
(
'setuptools.command.build_clib.newer_pairwise_group'
)
'setuptools.command.build_clib.newer_pairwise_group'
)
def
test_build_libraries
(
self
,
mock_newer
):
dist
=
Distribution
()
cmd
=
build_clib
(
dist
)
...
...
setuptools/tests/test_config.py
View file @
5ce9e5f3
...
...
@@ -695,7 +695,7 @@ class TestOptions:
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
set
(
dist
.
packages
)
==
set
(
[
'fake_package'
,
'fake_package.sub_two'
])
[
'fake_package'
,
'fake_package.sub_two'
])
@
py2_only
def
test_find_namespace_directive_fails_on_py2
(
self
,
tmpdir
):
...
...
@@ -748,7 +748,7 @@ class TestOptions:
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
set
(
dist
.
packages
)
==
{
'fake_package'
,
'fake_package.sub_two'
'fake_package'
,
'fake_package.sub_two'
}
def
test_extras_require
(
self
,
tmpdir
):
...
...
@@ -881,7 +881,7 @@ class TestExternalSetters:
return
None
@
patch
.
object
(
_Distribution
,
'__init__'
,
autospec
=
True
)
def
test_external_setters
(
self
,
mock_parent_init
,
tmpdir
):
def
test_external_setters
(
self
,
mock_parent_init
,
tmpdir
):
mock_parent_init
.
side_effect
=
self
.
_fake_distribution_init
dist
=
Distribution
(
attrs
=
{
...
...
setuptools/tests/test_easy_install.py
View file @
5ce9e5f3
...
...
@@ -629,7 +629,7 @@ class TestSetupRequires:
test_pkg
=
create_setup_requires_package
(
temp_dir
,
setup_attrs
=
dict
(
version
=
'attr: foobar.version'
),
make_package
=
make_dependency_sdist
,
use_setup_cfg
=
use_setup_cfg
+
(
'version'
,),
use_setup_cfg
=
use_setup_cfg
+
(
'version'
,),
)
test_setup_py
=
os
.
path
.
join
(
test_pkg
,
'setup.py'
)
with
contexts
.
quiet
()
as
(
stdout
,
stderr
):
...
...
@@ -905,8 +905,8 @@ def make_python_requires_sdist(dist_path, distname, version, python_requires):
python_requires={python_requires!r},
)
"""
).
format
(
name
=
distname
,
version
=
version
,
python_requires
=
python_requires
)),
name
=
distname
,
version
=
version
,
python_requires
=
python_requires
)),
(
'setup.cfg'
,
''
),
])
...
...
@@ -965,16 +965,16 @@ def create_setup_requires_package(path, distname='foobar', version='0.1',
value
=
';'
.
join
(
value
)
section
.
append
(
'%s: %s'
%
(
name
,
value
))
test_setup_cfg_contents
=
DALS
(
"""
[metadata]
{metadata}
[options]
{options}
"""
).
format
(
options
=
'
\
n
'
.
join
(
options
),
metadata
=
'
\
n
'
.
join
(
metadata
),
)
"""
[metadata]
{metadata}
[options]
{options}
"""
).
format
(
options
=
'
\
n
'
.
join
(
options
),
metadata
=
'
\
n
'
.
join
(
metadata
),
)
else
:
test_setup_cfg_contents
=
''
with
open
(
os
.
path
.
join
(
test_pkg
,
'setup.cfg'
),
'w'
)
as
f
:
...
...
setuptools/tests/test_setuptools.py
View file @
5ce9e5f3
...
...
@@ -223,10 +223,10 @@ class TestFeatures:
py_modules
=
[
'bar_et'
],
remove
=
[
'bar.ext'
],
),
'baz'
:
Feature
(
"baz"
,
optional
=
False
,
packages
=
[
'pkg.baz'
],
scripts
=
[
'scripts/baz_it'
],
libraries
=
[(
'libfoo'
,
'foo/foofoo.c'
)]
),
"baz"
,
optional
=
False
,
packages
=
[
'pkg.baz'
],
scripts
=
[
'scripts/baz_it'
],
libraries
=
[(
'libfoo'
,
'foo/foofoo.c'
)]
),
'dwim'
:
Feature
(
"DWIM"
,
available
=
False
,
remove
=
'bazish'
),
},
script_args
=
[
'--without-bar'
,
'install'
],
...
...
setuptools/tests/test_wheel.py
View file @
5ce9e5f3
...
...
@@ -125,11 +125,12 @@ def flatten_tree(tree):
def
format_install_tree
(
tree
):
return
{
x
.
format
(
py_version
=
PY_MAJOR
,
platform
=
get_platform
(),
shlib_ext
=
get_config_var
(
'EXT_SUFFIX'
)
or
get_config_var
(
'SO'
))
for
x
in
tree
}
return
{
x
.
format
(
py_version
=
PY_MAJOR
,
platform
=
get_platform
(),
shlib_ext
=
get_config_var
(
'EXT_SUFFIX'
)
or
get_config_var
(
'SO'
))
for
x
in
tree
}
def
_check_wheel_install
(
filename
,
install_dir
,
install_tree_includes
,
...
...
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