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
3a8d4728
Commit
3a8d4728
authored
Mar 06, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract method for fixing install dir
parent
12616142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+14
-9
No files found.
setuptools/command/easy_install.py
View file @
3a8d4728
...
@@ -237,15 +237,7 @@ class easy_install(Command):
...
@@ -237,15 +237,7 @@ class easy_install(Command):
self
.
config_vars
[
'userbase'
]
=
self
.
install_userbase
self
.
config_vars
[
'userbase'
]
=
self
.
install_userbase
self
.
config_vars
[
'usersite'
]
=
self
.
install_usersite
self
.
config_vars
[
'usersite'
]
=
self
.
install_usersite
# fix the install_dir if "--user" was used
self
.
_fix_install_dir_for_user_site
()
if
self
.
user
and
site
.
ENABLE_USER_SITE
:
self
.
create_home_path
()
if
self
.
install_userbase
is
None
:
raise
DistutilsPlatformError
(
"User base directory is not specified"
)
self
.
install_base
=
self
.
install_platbase
=
self
.
install_userbase
scheme_name
=
os
.
name
.
replace
(
'posix'
,
'unix'
)
+
'_user'
self
.
select_scheme
(
scheme_name
)
self
.
expand_basedirs
()
self
.
expand_basedirs
()
self
.
expand_dirs
()
self
.
expand_dirs
()
...
@@ -340,6 +332,19 @@ class easy_install(Command):
...
@@ -340,6 +332,19 @@ class easy_install(Command):
self
.
outputs
=
[]
self
.
outputs
=
[]
def
_fix_install_dir_for_user_site
(
self
):
"""
Fix the install_dir if "--user" was used.
"""
if
self
.
user
and
site
.
ENABLE_USER_SITE
:
self
.
create_home_path
()
if
self
.
install_userbase
is
None
:
raise
DistutilsPlatformError
(
"User base directory is not specified"
)
self
.
install_base
=
self
.
install_platbase
=
self
.
install_userbase
scheme_name
=
os
.
name
.
replace
(
'posix'
,
'unix'
)
+
'_user'
self
.
select_scheme
(
scheme_name
)
def
_expand_attrs
(
self
,
attrs
):
def
_expand_attrs
(
self
,
attrs
):
for
attr
in
attrs
:
for
attr
in
attrs
:
val
=
getattr
(
self
,
attr
)
val
=
getattr
(
self
,
attr
)
...
...
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