forked from pypa/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: build binary distributions via sdists by default
Fixes pypa#257 Signed-off-by: Filipe Laíns <[email protected]>
- Loading branch information
Showing
9 changed files
with
241 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/packages/test-cant-build-via-sdist/backend_bad_sdist.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
import os.path | ||
import tarfile | ||
import zipfile | ||
|
||
|
||
def build_sdist(sdist_directory, config_settings=None): | ||
name = 'test_cant_build_via_sdist-1.0.0' | ||
file = '{}.tar.gz'.format(name) | ||
with tarfile.open(os.path.join(sdist_directory, file), 'w') as t: | ||
t.add('pyproject.toml', '{}/pyproject.toml'.format(name)) | ||
t.add('backend_bad_sdist.py', '{}/backend_bad_sdist.py'.format(name)) | ||
return file | ||
|
||
|
||
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): | ||
if not os.path.isfile('some-file-that-is-needed-for-build.txt'): | ||
raise FileNotFoundError('some-file-that-is-needed-for-build.txt is missing!') | ||
# pragma: no cover | ||
file = 'test_cant_build_via_sdist-1.0.0-py2.py3-none-any.whl' | ||
zipfile.ZipFile(os.path.join(wheel_directory, file), 'w').close() | ||
return file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[build-system] | ||
build-backend = 'backend_bad_sdist' | ||
backend-path = ['.'] | ||
requires = [] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[metadata] | ||
name = test_setuptools | ||
version = 1.0.0 | ||
|
||
[bdist_wheel] | ||
universal = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.