You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2024/08/04 17:07:45 UTC
(buildstream-plugins) 02/03: wip
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 0841aed0d4a9e5228a4d761ec3b9846b1b95ba50
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Sun Aug 4 18:28:48 2024 +0200
wip
---
tests/testutils/python_repo.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/testutils/python_repo.py b/tests/testutils/python_repo.py
index 2cdca72..69ace07 100644
--- a/tests/testutils/python_repo.py
+++ b/tests/testutils/python_repo.py
@@ -98,8 +98,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)
- # Build distributions
- subprocess.run([sys.executable, "-m", "build"], cwd=tmpdir, check=True)
+ # Build 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:
@@ -113,12 +113,12 @@ def generate_pip_package(tmpdir, pypi, name, version="0.1", dependencies=None):
links = ""
- # copy generated distributions to pypi package
+ # copy generated tarfile to pypi package
dist_dir = os.path.join(tmpdir, "dist")
- for dist in os.listdir(dist_dir):
- distpath = os.path.join(dist_dir, dist)
- shutil.copy(distpath, pypi_package)
- links += HTML_LINK_TEMPLATE.format(dist=dist)
+ for tar in os.listdir(dist_dir):
+ tarpath = os.path.join(dist_dir, tar)
+ shutil.copy(tarpath, pypi_package)
+ links += HTML_LINK_TEMPLATE.format(dist=tar)
# add an index html page
index_html = os.path.join(pypi_package, "index.html")