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
c04abca6
Commit
c04abca6
authored
Jun 12, 2013
by
Arfrever Frehtes Taifersar Arahesis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new sysconfig module with Python 2.7 or >=3.2.
parent
0dfd7768
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
18 deletions
+42
-18
CHANGES.txt
CHANGES.txt
+1
-0
pkg_resources.py
pkg_resources.py
+3
-2
setuptools/command/bdist_egg.py
setuptools/command/bdist_egg.py
+8
-4
setuptools/command/build_ext.py
setuptools/command/build_ext.py
+15
-9
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+15
-3
No files found.
CHANGES.txt
View file @
c04abca6
...
...
@@ -9,6 +9,7 @@ CHANGES
* Rename DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT environment
variable to SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT.
* Issue #1: Disable installation of Windows-specific files on non-Windows systems.
* Use new sysconfig module with Python 2.7 or >=3.2.
-----
0.7.2
...
...
pkg_resources.py
View file @
c04abca6
...
...
@@ -245,9 +245,10 @@ def get_build_platform():
needs some hacks for Linux and Mac OS X.
"""
try
:
from
distutils.util
import
get_platform
except
ImportError
:
# Python 2.7 or >=3.2
from
sysconfig
import
get_platform
except
ImportError
:
from
distutils.util
import
get_platform
plat
=
get_platform
()
if
sys
.
platform
==
"darwin"
and
not
plat
.
startswith
(
'macosx-'
):
...
...
setuptools/command/bdist_egg.py
View file @
c04abca6
...
...
@@ -7,10 +7,14 @@ import sys, os, marshal
from
setuptools
import
Command
from
distutils.dir_util
import
remove_tree
,
mkpath
try
:
from
distutils.sysconfig
import
get_python_version
,
get_python_lib
# Python 2.7 or >=3.2
from
sysconfig
import
get_path
,
get_python_version
def
_get_purelib
():
return
get_path
(
"purelib"
)
except
ImportError
:
from
sysconfig
import
get_python_version
from
distutils.sysconfig
import
get_python_lib
from
distutils.sysconfig
import
get_python_lib
,
get_python_version
def
_get_purelib
():
return
get_python_lib
(
False
)
from
distutils
import
log
from
distutils.errors
import
DistutilsSetupError
...
...
@@ -130,7 +134,7 @@ class bdist_egg(Command):
# Hack for packages that install data to install's --install-lib
self
.
get_finalized_command
(
'install'
).
install_lib
=
self
.
bdist_dir
site_packages
=
os
.
path
.
normcase
(
os
.
path
.
realpath
(
get_python_
lib
()))
site_packages
=
os
.
path
.
normcase
(
os
.
path
.
realpath
(
_get_pure
lib
()))
old
,
self
.
distribution
.
data_files
=
self
.
distribution
.
data_files
,[]
for
item
in
old
:
...
...
setuptools/command/build_ext.py
View file @
c04abca6
...
...
@@ -9,9 +9,15 @@ import os, sys
from
distutils.file_util
import
copy_file
from
setuptools.extension
import
Library
from
distutils.ccompiler
import
new_compiler
from
distutils.sysconfig
import
customize_compiler
,
get_config_var
get_config_var
(
"LDSHARED"
)
# make sure _config_vars is initialized
from
distutils.sysconfig
import
_config_vars
from
distutils.sysconfig
import
customize_compiler
try
:
# Python 2.7 or >=3.2
from
sysconfig
import
_CONFIG_VARS
except
ImportError
:
from
distutils.sysconfig
import
get_config_var
get_config_var
(
"LDSHARED"
)
# make sure _config_vars is initialized
del
get_config_var
from
distutils.sysconfig
import
_config_vars
as
_CONFIG_VARS
from
distutils
import
log
from
distutils.errors
import
*
...
...
@@ -131,16 +137,16 @@ class build_ext(_build_ext):
compiler
=
self
.
compiler
,
dry_run
=
self
.
dry_run
,
force
=
self
.
force
)
if
sys
.
platform
==
"darwin"
:
tmp
=
_
config_vars
.
copy
()
tmp
=
_
CONFIG_VARS
.
copy
()
try
:
# XXX Help! I don't have any idea whether these are right...
_
config_vars
[
'LDSHARED'
]
=
"gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
_
config_vars
[
'CCSHARED'
]
=
" -dynamiclib"
_
config_vars
[
'SO'
]
=
".dylib"
_
CONFIG_VARS
[
'LDSHARED'
]
=
"gcc -Wl,-x -dynamiclib -undefined dynamic_lookup"
_
CONFIG_VARS
[
'CCSHARED'
]
=
" -dynamiclib"
_
CONFIG_VARS
[
'SO'
]
=
".dylib"
customize_compiler
(
compiler
)
finally
:
_
config_vars
.
clear
()
_
config_vars
.
update
(
tmp
)
_
CONFIG_VARS
.
clear
()
_
CONFIG_VARS
.
update
(
tmp
)
else
:
customize_compiler
(
compiler
)
...
...
setuptools/command/easy_install.py
View file @
c04abca6
...
...
@@ -25,9 +25,22 @@ import pkg_resources
from
setuptools
import
Command
,
_dont_write_bytecode
from
setuptools.sandbox
import
run_setup
from
distutils
import
log
,
dir_util
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
distutils.util
import
get_platform
from
distutils.util
import
convert_path
,
subst_vars
from
distutils.sysconfig
import
get_python_lib
,
get_config_vars
from
distutils.errors
import
DistutilsArgError
,
DistutilsOptionError
,
\
DistutilsError
,
DistutilsPlatformError
from
distutils.command.install
import
INSTALL_SCHEMES
,
SCHEME_KEYS
...
...
@@ -1398,8 +1411,7 @@ def get_site_dirs():
'Python'
,
sys
.
version
[:
3
],
'site-packages'
))
for
plat_specific
in
(
0
,
1
):
site_lib
=
get_python_lib
(
plat_specific
)
for
site_lib
in
(
_get_purelib
(),
_get_platlib
()):
if
site_lib
not
in
sitedirs
:
sitedirs
.
append
(
site_lib
)
if
HAS_USER_SITE
:
...
...
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