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
feea356d
Commit
feea356d
authored
Jan 02, 2019
by
mergify[bot]
Committed by
GitHub
Jan 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1626 from pypa/iterator-unpack
Refactor build_meta
parents
2db2a8f3
2bb8225a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
setuptools/build_meta.py
setuptools/build_meta.py
+11
-10
No files found.
setuptools/build_meta.py
View file @
feea356d
...
...
@@ -149,6 +149,15 @@ def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
return
dist_infos
[
0
]
def
_file_with_extension
(
directory
,
extension
):
matching
=
(
f
for
f
in
os
.
listdir
(
directory
)
if
f
.
endswith
(
extension
)
)
file
,
=
matching
return
file
def
build_wheel
(
wheel_directory
,
config_settings
=
None
,
metadata_directory
=
None
):
config_settings
=
_fix_config
(
config_settings
)
...
...
@@ -160,11 +169,7 @@ def build_wheel(wheel_directory, config_settings=None,
shutil
.
rmtree
(
wheel_directory
)
shutil
.
copytree
(
'dist'
,
wheel_directory
)
wheels
=
[
f
for
f
in
os
.
listdir
(
wheel_directory
)
if
f
.
endswith
(
'.whl'
)]
assert
len
(
wheels
)
==
1
return
wheels
[
0
]
return
_file_with_extension
(
wheel_directory
,
'.whl'
)
def
build_sdist
(
sdist_directory
,
config_settings
=
None
):
...
...
@@ -175,8 +180,4 @@ def build_sdist(sdist_directory, config_settings=None):
[
"--dist-dir"
,
sdist_directory
]
_run_setup
()
sdists
=
[
f
for
f
in
os
.
listdir
(
sdist_directory
)
if
f
.
endswith
(
'.tar.gz'
)]
assert
len
(
sdists
)
==
1
return
sdists
[
0
]
return
_file_with_extension
(
sdist_directory
,
'.tar.gz'
)
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