From b10e4a0d7dc90193208868d6f5d2c2720789271e Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 5 Aug 2022 15:35:45 +0000 Subject: [PATCH] Remove PBR-specific validation code With the recent switch to using the build utility, this should no longer be necessary. Even more recent changes in the Python packaging toolchain seem to have made it stop working anyway, so remove it and treat PBR's builds like any other project. Change-Id: I6f9a4546fb6a7b2a4836d6aeea0713f7a7da3002 --- openstack_releases/pythonutils.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/openstack_releases/pythonutils.py b/openstack_releases/pythonutils.py index cec0a13cb2..ac31e7d5a5 100644 --- a/openstack_releases/pythonutils.py +++ b/openstack_releases/pythonutils.py @@ -74,19 +74,6 @@ def build_sdist(workdir, repo): LOG.debug('did not find %s, maybe %s is not a python project', setup_path, repo) return - use_tox = repo.endswith('/pbr') - if use_tox and not os.path.exists(os.path.join(dest, '.tox', 'venv')): - # Use tox to set up a virtualenv so we can install the - # dependencies for the package. This only seems to be - # necessary for pbr, but... - processutils.check_output( - ['tox', '-e', 'venv', '--notest'], - cwd=dest, - ) - if use_tox: - python = '.tox/venv/bin/python3' - else: - python = 'python3' # Set some flags to turn off pbr functionality that we don't need. flags = { @@ -94,7 +81,7 @@ def build_sdist(workdir, repo): 'SKIP_GENERATE_AUTHORS': '1', 'SKIP_WRITE_GIT_CHANGELOG': '1', } - cmd = [python, '-m', 'build', '--sdist', '--wheel'] + cmd = ['python3', '-m', 'build', '--sdist', '--wheel'] processutils.check_call( cmd, cwd=dest,