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
8a94f99b
Commit
8a94f99b
authored
Nov 27, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract py31compat module for get_config_vars and get_path
parent
bc47a75d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+3
-14
setuptools/py31compat.py
setuptools/py31compat.py
+11
-0
No files found.
setuptools/command/easy_install.py
View file @
8a94f99b
...
...
@@ -32,19 +32,7 @@ from distutils import log, dir_util
import
pkg_resources
from
setuptools
import
Command
,
_dont_write_bytecode
from
setuptools.sandbox
import
run_setup
try
:
# Python 2.7 or >=3.2
from
sysconfig
import
get_config_vars
,
get_path
def
_get_platlib
():
return
get_path
(
"platlib"
)
def
_get_purelib
():
return
get_path
(
"purelib"
)
except
ImportError
:
from
distutils.sysconfig
import
get_config_vars
,
get_python_lib
def
_get_platlib
():
return
get_python_lib
(
True
)
def
_get_purelib
():
return
get_python_lib
(
False
)
from
setuptools.py31compat
import
get_path
,
get_config_vars
from
distutils.util
import
get_platform
from
distutils.util
import
convert_path
,
subst_vars
...
...
@@ -1288,7 +1276,8 @@ def get_site_dirs():
'Python'
,
sys
.
version
[:
3
],
'site-packages'
))
for
site_lib
in
(
_get_purelib
(),
_get_platlib
()):
lib_paths
=
get_path
(
'purelib'
),
get_path
(
'platlib'
)
for
site_lib
in
lib_paths
:
if
site_lib
not
in
sitedirs
:
sitedirs
.
append
(
site_lib
)
if
HAS_USER_SITE
:
...
...
setuptools/py31compat.py
0 → 100644
View file @
8a94f99b
__all__
=
[
'get_config_vars'
,
'get_path'
]
try
:
# Python 2.7 or >=3.2
from
sysconfig
import
get_config_vars
,
get_path
except
ImportError
:
from
distutils.sysconfig
import
get_config_vars
,
get_python_lib
def
get_path
(
name
):
if
name
not
in
(
'platlib'
,
'purelib'
):
raise
ValueError
(
"Name must be purelib or platlib"
)
return
get_python_lib
(
name
==
'platlib'
)
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