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
e301ab46
Commit
e301ab46
authored
Sep 26, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move inline function into an instance method and rename for clarity.
parent
86f35df3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
setuptools/command/install_lib.py
setuptools/command/install_lib.py
+11
-11
No files found.
setuptools/command/install_lib.py
View file @
e301ab46
...
...
@@ -18,22 +18,22 @@ class install_lib(orig.install_lib):
Return a collections.Sized collections.Container of paths to be
excluded for single_version_externally_managed installations.
"""
def
_exclude
(
pkg
,
exclusion_path
):
"""
Given a package name and exclusion path within that package,
compute the full exclusion path.
"""
parts
=
pkg
.
split
(
'.'
)
+
[
exclusion_path
]
return
os
.
path
.
join
(
self
.
install_dir
,
*
parts
)
all_packages
=
(
pkg
for
ns_pkg
in
self
.
_get_SVEM_NSPs
()
for
pkg
in
self
.
_all_packages
(
ns_pkg
)
)
excl_specs
=
product
(
all_packages
,
self
.
_gen_exclude_names
())
return
set
(
starmap
(
_exclude
,
excl_specs
))
excl_specs
=
product
(
all_packages
,
self
.
_gen_exclusion_paths
())
return
set
(
starmap
(
self
.
_exclude_pkg_path
,
excl_specs
))
def
_exclude_pkg_path
(
self
,
pkg
,
exclusion_path
):
"""
Given a package name and exclusion path within that package,
compute the full exclusion path.
"""
parts
=
pkg
.
split
(
'.'
)
+
[
exclusion_path
]
return
os
.
path
.
join
(
self
.
install_dir
,
*
parts
)
@
staticmethod
def
_all_packages
(
pkg_name
):
...
...
@@ -62,7 +62,7 @@ class install_lib(orig.install_lib):
return
self
.
distribution
.
namespace_packages
if
svem
else
[]
@
staticmethod
def
_gen_exclu
de_name
s
():
def
_gen_exclu
sion_path
s
():
"""
Generate file paths to be excluded for namespace packages (bytecode
cache files).
...
...
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