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
37d8f047
Commit
37d8f047
authored
Aug 31, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clean' into master
parents
ad6ffd40
ae27e13a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
3 deletions
+34
-3
distutils/py35compat.py
distutils/py35compat.py
+19
-0
distutils/py38compat.py
distutils/py38compat.py
+7
-0
distutils/tests/py38compat.py
distutils/tests/py38compat.py
+3
-0
distutils/util.py
distutils/util.py
+5
-3
No files found.
distutils/py35compat.py
0 → 100644
View file @
37d8f047
import
sys
import
subprocess
def
__optim_args_from_interpreter_flags
():
"""Return a list of command-line arguments reproducing the current
optimization settings in sys.flags."""
args
=
[]
value
=
sys
.
flags
.
optimize
if
value
>
0
:
args
.
append
(
"-"
+
"O"
*
value
)
return
args
_optim_args_from_interpreter_flags
=
getattr
(
subprocess
,
"_optim_args_from_interpreter_flags"
,
__optim_args_from_interpreter_flags
,
)
distutils/py38compat.py
0 → 100644
View file @
37d8f047
def
aix_platform
(
osname
,
version
,
release
):
try
:
import
_aix_support
return
_aix_support
.
aix_platform
()
except
ImportError
:
pass
return
"%s-%s.%s"
%
(
osname
,
version
,
release
)
distutils/tests/py38compat.py
View file @
37d8f047
# flake8: noqa
import
contextlib
import
builtins
ModuleNotFoundError
=
getattr
(
builtins
,
'ModuleNotFoundError'
,
ImportError
)
try
:
from
test.support.warnings_helper
import
check_warnings
...
...
distutils/util.py
View file @
37d8f047
...
...
@@ -14,6 +14,8 @@ from distutils.dep_util import newer
from
distutils.spawn
import
spawn
from
distutils
import
log
from
distutils.errors
import
DistutilsByteCompileError
from
.py35compat
import
_optim_args_from_interpreter_flags
def
get_host_platform
():
"""Return a string that identifies the current platform. This is used mainly to
...
...
@@ -79,8 +81,8 @@ def get_host_platform():
machine
+=
".%s"
%
bitness
[
sys
.
maxsize
]
# fall through to standard osname-release-machine representation
elif
osname
[:
3
]
==
"aix"
:
from
_aix_suppor
t
import
aix_platform
return
aix_platform
()
from
.py38compa
t
import
aix_platform
return
aix_platform
(
osname
,
version
,
release
)
elif
osname
[:
6
]
==
"cygwin"
:
osname
=
"cygwin"
rel_re
=
re
.
compile
(
r'[\
d.]+
', re.ASCII)
...
...
@@ -420,7 +422,7 @@ byte_compile(files, optimize=%r, force=%r,
"""
%
(
optimize
,
force
,
prefix
,
base_dir
,
verbose
))
cmd
=
[
sys
.
executable
]
cmd
.
extend
(
subprocess
.
_optim_args_from_interpreter_flags
())
cmd
.
extend
(
_optim_args_from_interpreter_flags
())
cmd
.
append
(
script_name
)
spawn
(
cmd
,
dry_run
=
dry_run
)
execute
(
os
.
remove
,
(
script_name
,),
"removing %s"
%
script_name
,
...
...
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