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
a52ff554
Commit
a52ff554
authored
Jul 26, 2008
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove incorrect usages of map() in distutils.
Reported by Lisandro Dalcin.
parent
e6c78afb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
9 deletions
+11
-9
cmd.py
cmd.py
+1
-1
command/build_ext.py
command/build_ext.py
+1
-1
dist.py
dist.py
+2
-1
filelist.py
filelist.py
+2
-2
mwerkscompiler.py
mwerkscompiler.py
+3
-3
text_file.py
text_file.py
+2
-1
No files found.
cmd.py
View file @
a52ff554
...
...
@@ -158,7 +158,7 @@ class Command:
print
(
indent
+
header
)
indent
=
indent
+
" "
for
(
option
,
_
,
_
)
in
self
.
user_options
:
option
=
option
.
translate
(
longopt_xlate
)
option
=
longopt_xlate
(
option
)
if
option
[
-
1
]
==
"="
:
option
=
option
[:
-
1
]
value
=
getattr
(
self
,
option
)
...
...
command/build_ext.py
View file @
a52ff554
...
...
@@ -244,7 +244,7 @@ class build_ext(Command):
if
self
.
define
:
defines
=
self
.
define
.
split
(
','
)
self
.
define
=
map
(
lambda
symbol
:
(
symbol
,
'1'
),
defines
)
self
.
define
=
[(
symbol
,
'1'
)
for
symbol
in
defines
]
# The option for macros to undefine is also a string from the
# option parsing, but has to be a list. Multiple symbols can also
...
...
dist.py
View file @
a52ff554
...
...
@@ -864,7 +864,8 @@ Common commands: (see '--help-commands' for more)
for
(
option
,
(
source
,
value
))
in
option_dict
.
items
():
if
DEBUG
:
print
(
" %s = %s (from %s)"
%
(
option
,
value
,
source
))
try
:
bool_opts
=
map
(
translate_longopt
,
command_obj
.
boolean_options
)
bool_opts
=
[
translate_longopt
(
o
)
for
o
in
command_obj
.
boolean_options
]
except
AttributeError
:
bool_opts
=
[]
try
:
...
...
filelist.py
View file @
a52ff554
...
...
@@ -85,13 +85,13 @@ class FileList:
if
len
(
words
)
<
2
:
raise
DistutilsTemplateError
(
"'%s' expects <pattern1> <pattern2> ..."
%
action
)
patterns
=
map
(
convert_path
,
words
[
1
:])
patterns
=
[
convert_path
(
w
)
for
w
in
words
[
1
:]]
elif
action
in
(
'recursive-include'
,
'recursive-exclude'
):
if
len
(
words
)
<
3
:
raise
DistutilsTemplateError
(
"'%s' expects <dir> <pattern1> <pattern2> ..."
%
action
)
dir
=
convert_path
(
words
[
1
])
patterns
=
map
(
convert_path
,
words
[
2
:])
patterns
=
[
convert_path
(
w
)
for
w
in
words
[
2
:]]
elif
action
in
(
'graft'
,
'prune'
):
if
len
(
words
)
!=
2
:
raise
DistutilsTemplateError
(
...
...
mwerkscompiler.py
View file @
a52ff554
...
...
@@ -104,10 +104,10 @@ class MWerksCompiler (CCompiler) :
# This is because we (usually) create the project in a subdirectory of
# where we are now, and keeping the paths relative is too much work right
# now.
sources
=
map
(
self
.
_filename_to_abs
,
self
.
__sources
)
include_dirs
=
map
(
self
.
_filename_to_abs
,
self
.
__include_dirs
)
sources
=
[
self
.
_filename_to_abs
(
s
)
for
s
in
self
.
__sources
]
include_dirs
=
[
self
.
_filename_to_abs
(
d
)
for
d
in
self
.
__include_dirs
]
if
objects
:
objects
=
map
(
self
.
_filename_to_abs
,
objects
)
objects
=
[
self
.
_filename_to_abs
(
o
)
for
o
in
objects
]
else
:
objects
=
[]
if
build_temp
:
...
...
text_file.py
View file @
a52ff554
...
...
@@ -292,7 +292,7 @@ line 3 \\
continues on next line
"""
# result 1: no fancy options
result1
=
map
(
lambda
x
:
x
+
"
\
n
"
,
test_data
.
split
(
"
\
n
"
)[
0
:
-
1
])
result1
=
[
x
+
"
\
n
"
for
x
in
test_data
.
split
(
"
\
n
"
)[:
-
1
]]
# result 2: just strip comments
result2
=
[
"
\
n
"
,
...
...
@@ -357,4 +357,5 @@ line 3 \\
join_lines
=
1
,
rstrip_ws
=
1
,
collapse_join
=
1
)
test_input
(
6
,
"join lines with collapsing"
,
in_file
,
result6
)
del
in_file
os
.
remove
(
filename
)
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