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
3b18e072
Commit
3b18e072
authored
Apr 10, 2017
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate technique for reading PYTHONPATH.
parent
fe3deeee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+7
-4
No files found.
setuptools/command/easy_install.py
View file @
3b18e072
...
...
@@ -474,8 +474,7 @@ class easy_install(Command):
else
:
self
.
pth_file
=
None
PYTHONPATH
=
os
.
environ
.
get
(
'PYTHONPATH'
,
''
).
split
(
os
.
pathsep
)
if
instdir
not
in
map
(
normalize_path
,
filter
(
None
,
PYTHONPATH
)):
if
instdir
not
in
map
(
normalize_path
,
_pythonpath
()):
# only PYTHONPATH dirs need a site.py, so pretend it's there
self
.
sitepy_installed
=
True
elif
self
.
multi_version
and
not
os
.
path
.
exists
(
pth_file
):
...
...
@@ -1348,6 +1347,11 @@ class easy_install(Command):
setattr
(
self
,
attr
,
val
)
def
_pythonpath
():
items
=
os
.
environ
.
get
(
'PYTHONPATH'
,
''
).
split
(
os
.
pathsep
)
return
filter
(
None
,
items
)
def
get_site_dirs
():
"""
Return a list of 'site' dirs
...
...
@@ -1356,8 +1360,7 @@ def get_site_dirs():
sitedirs
=
[]
# start with PYTHONPATH
pythonpath_items
=
os
.
environ
.
get
(
'PYTHONPATH'
,
''
).
split
(
os
.
pathsep
)
sitedirs
.
extend
(
filter
(
None
,
pythonpath_items
))
sitedirs
.
extend
(
_pythonpath
())
prefixes
=
[
sys
.
prefix
]
if
sys
.
exec_prefix
!=
sys
.
prefix
:
...
...
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