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
7326bdfa
Commit
7326bdfa
authored
Apr 05, 2019
by
Jason R. Coombs
Committed by
GitHub
Apr 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1709 from radiasoft/master
uniquify paths in PYTHONPATH
parents
7a80e29b
1b4ef963
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
changelog.d/1709.bugfix.rst
changelog.d/1709.bugfix.rst
+1
-0
setuptools/command/test.py
setuptools/command/test.py
+2
-1
No files found.
changelog.d/1709.bugfix.rst
0 → 100644
View file @
7326bdfa
In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH.
setuptools/command/test.py
View file @
7326bdfa
...
...
@@ -15,6 +15,7 @@ from pkg_resources import (resource_listdir, resource_exists, normalize_path,
working_set
,
_namespace_packages
,
evaluate_marker
,
add_activation_listener
,
require
,
EntryPoint
)
from
setuptools
import
Command
from
.build_py
import
_unique_everseen
__metaclass__
=
type
...
...
@@ -186,7 +187,7 @@ class test(Command):
orig_pythonpath
=
os
.
environ
.
get
(
'PYTHONPATH'
,
nothing
)
current_pythonpath
=
os
.
environ
.
get
(
'PYTHONPATH'
,
''
)
try
:
prefix
=
os
.
pathsep
.
join
(
paths
)
prefix
=
os
.
pathsep
.
join
(
_unique_everseen
(
paths
)
)
to_join
=
filter
(
None
,
[
prefix
,
current_pythonpath
])
new_path
=
os
.
pathsep
.
join
(
to_join
)
if
new_path
:
...
...
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