This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch juerg/ci-test in repository https://gitbox.apache.org/repos/asf/buildstream-plugins.git
commit 2659575c3795b1597a5905a320a723e11536e744 Author: Jürg Billeter <[email protected]> AuthorDate: Sun Aug 4 17:13:39 2024 +0200 build update sdist names to match PEP 625 to match names produced by the build module (and also setuptools 69.4+) setup.py sdist is deprected PEP 625 --- requirements/test-requirements.txt | 1 + tests/sources/pip_build.py | 16 ++++++++-------- tests/testutils/python_repo.py | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/requirements/test-requirements.txt b/requirements/test-requirements.txt index b6846f6..9255a27 100644 --- a/requirements/test-requirements.txt +++ b/requirements/test-requirements.txt @@ -1,3 +1,4 @@ +build pytest-env # Provide option to run tests in parallel, less reliable pytest-xdist diff --git a/tests/sources/pip_build.py b/tests/sources/pip_build.py index 7f851d3..3868190 100644 --- a/tests/sources/pip_build.py +++ b/tests/sources/pip_build.py @@ -96,11 +96,11 @@ def test_pip_source_import_packages(cli, datafiles, setup_pypi_repo): "/.bst_pip_downloads", "/.bst_pip_downloads/hellolib-0.1.tar.gz", "/.bst_pip_downloads/app2-0.1.tar.gz", - "/.bst_pip_downloads/app.3-0.1.tar.gz", - "/.bst_pip_downloads/app-4-0.1.tar.gz", + "/.bst_pip_downloads/app_3-0.1.tar.gz", + "/.bst_pip_downloads/app_4-0.1.tar.gz", "/.bst_pip_downloads/app_5-0.1.tar.gz", - "/.bst_pip_downloads/app.no.6-0.1.tar.gz", - "/.bst_pip_downloads/app-no-7-0.1.tar.gz", + "/.bst_pip_downloads/app_no_6-0.1.tar.gz", + "/.bst_pip_downloads/app_no_7-0.1.tar.gz", "/.bst_pip_downloads/app_no_8-0.1.tar.gz", ], ) @@ -168,11 +168,11 @@ def test_pip_source_import_requirements_files(cli, datafiles, setup_pypi_repo): "/.bst_pip_downloads", "/.bst_pip_downloads/hellolib-0.1.tar.gz", "/.bst_pip_downloads/app2-0.1.tar.gz", - "/.bst_pip_downloads/app.3-0.1.tar.gz", - "/.bst_pip_downloads/app-4-0.1.tar.gz", + "/.bst_pip_downloads/app_3-0.1.tar.gz", + "/.bst_pip_downloads/app_4-0.1.tar.gz", "/.bst_pip_downloads/app_5-0.1.tar.gz", - "/.bst_pip_downloads/app.no.6-0.1.tar.gz", - "/.bst_pip_downloads/app-no-7-0.1.tar.gz", + "/.bst_pip_downloads/app_no_6-0.1.tar.gz", + "/.bst_pip_downloads/app_no_7-0.1.tar.gz", "/.bst_pip_downloads/app_no_8-0.1.tar.gz", ], ) diff --git a/tests/testutils/python_repo.py b/tests/testutils/python_repo.py index 67f938c..a2b2443 100644 --- a/tests/testutils/python_repo.py +++ b/tests/testutils/python_repo.py @@ -94,8 +94,8 @@ def generate_pip_package(tmpdir, pypi, name, version="0.1", dependencies=None): f.write(INIT_TEMPLATE.format(name=name)) os.chmod(main_file, 0o644) - # Run sdist with a fresh process - subprocess.run([sys.executable, "setup.py", "sdist"], cwd=tmpdir, check=True) + # Generate source distribution + subprocess.run([sys.executable, "-m", "build", "--sdist"], cwd=tmpdir, check=True) # create directory for this package in pypi resulting in a directory # tree resembling the following structure:
