From e0461bb5850decc677260fcdc27c4db4e04ebeae Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 28 Dec 2020 13:47:44 +0900 Subject: [PATCH] Imported Upstream version 5.5.0 --- .zuul.yaml | 45 +++--- AUTHORS | 2 + CONTRIBUTING.rst | 4 +- ChangeLog | 19 +++ PKG-INFO | 10 +- README.rst | 5 +- doc/source/conf.py | 9 +- doc/source/user/history.rst | 1 + doc/source/user/index.rst | 2 + doc/source/user/releasenotes.rst | 6 + doc/source/user/using.rst | 2 +- lower-constraints.txt | 4 +- pbr.egg-info/PKG-INFO | 10 +- pbr.egg-info/SOURCES.txt | 9 +- pbr/packaging.py | 20 +-- pbr/tests/base.py | 7 +- pbr/tests/test_commands.py | 4 +- pbr/tests/test_core.py | 7 + pbr/tests/test_integration.py | 85 ++++++----- pbr/tests/test_packaging.py | 3 +- pbr/tests/test_util.py | 6 +- pbr/tests/testpackage/setup.cfg | 4 +- pbr/util.py | 3 +- .../pbr-installation-devstack/post.yaml | 15 -- .../legacy/pbr-installation-devstack/run.yaml | 136 ------------------ .../post.yaml | 15 -- .../run.yaml | 136 ------------------ playbooks/pbr-installation-openstack/pre.yaml | 4 + playbooks/pbr-installation-openstack/run.yaml | 6 + ...dist_wininst-removal-4a1c7c3a9f08238d.yaml | 9 ++ releasenotes/source/conf.py | 15 +- setup.cfg | 4 +- test-requirements.txt | 9 +- tools/integration.sh | 31 ++-- tox.ini | 5 +- 35 files changed, 226 insertions(+), 426 deletions(-) create mode 100644 doc/source/user/history.rst create mode 100644 doc/source/user/releasenotes.rst delete mode 100644 playbooks/legacy/pbr-installation-devstack/post.yaml delete mode 100644 playbooks/legacy/pbr-installation-devstack/run.yaml delete mode 100644 playbooks/legacy/pbr-installation-upstream-devstack/post.yaml delete mode 100644 playbooks/legacy/pbr-installation-upstream-devstack/run.yaml create mode 100644 playbooks/pbr-installation-openstack/pre.yaml create mode 100644 playbooks/pbr-installation-openstack/run.yaml create mode 100644 releasenotes/notes/bdist_wininst-removal-4a1c7c3a9f08238d.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 7605424..a4156aa 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,12 +1,12 @@ - job: - name: pbr-installation-devstack-base - parent: legacy-dsvm-base - timeout: 7800 + name: pbr-installation-openstack-base + timeout: 5400 + description: | + Base job for pbr jobs that install openstack packages with current + pbr. This ensures we don't break our ability to install openstack. required-projects: - - openstack/devstack - - openstack/grenade + # TODO update this list with current active python projects - openstack/pbr - - openstack/devstack-gate - openstack/tripleo-ci - openstack/aodh - openstack/automaton @@ -34,7 +34,6 @@ - openstack/manila - openstack/manila-ui - openstack/neutron - - openstack/neutron-fwaas - openstack/neutron-vpnaas - openstack/nova - openstack/octavia @@ -91,16 +90,20 @@ - openstack/zaqar - job: - name: pbr-installation-devstack - parent: pbr-installation-devstack-base - run: playbooks/legacy/pbr-installation-devstack/run.yaml - post-run: playbooks/legacy/pbr-installation-devstack/post.yaml + name: pbr-installation-openstack + parent: pbr-installation-openstack-base + pre-run: playbooks/pbr-installation-openstack/pre.yaml + run: playbooks/pbr-installation-openstack/run.yaml + vars: + pbr_pip_version: '' - job: - name: pbr-installation-upstream-devstack - parent: pbr-installation-devstack-base - run: playbooks/legacy/pbr-installation-upstream-devstack/run.yaml - post-run: playbooks/legacy/pbr-installation-upstream-devstack/post.yaml + name: pbr-installation-openstack-pip-dev + description: | + This job runs the pbr installations with pip trunk. + parent: pbr-installation-openstack + vars: + pbr_pip_version: 'git+https://github.com/pypa/pip.git#egg=pip' - project: templates: @@ -114,9 +117,13 @@ - publish-openstack-docs-pti check: jobs: - - pbr-installation-devstack - - pbr-installation-upstream-devstack + - pbr-installation-openstack + - pbr-installation-openstack-pip-dev gate: jobs: - - pbr-installation-devstack - - pbr-installation-upstream-devstack + - pbr-installation-openstack + - pbr-installation-openstack-pip-dev + periodic: + jobs: + - pbr-installation-openstack + - pbr-installation-openstack-pip-dev diff --git a/AUTHORS b/AUTHORS index f25c458..17a7b62 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ Andreas Jaeger Andrew Bogott Angus Salkeld Anthony Young +Antoine Musso Attila Fazekas Ben Nemec Bhuvan Arumugam @@ -110,6 +111,7 @@ Sean Dague Sean Dague Sean McGinnis Sergey Lukjanov +Slawek Kaplonski Sorin Sbarnea Stephen Finucane Stephen Finucane diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 51b3e69..33adff5 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,13 +1,13 @@ If you would like to contribute to the development of OpenStack, you must follow the steps in this page: - http://docs.openstack.org/infra/manual/developers.html + https://docs.opendev.org/opendev/infra-manual/latest/developers.html Once those steps have been completed, changes to OpenStack should be submitted for review via the Gerrit tool, following the workflow documented at: - http://docs.openstack.org/infra/manual/developers.html#development-workflow + https://docs.opendev.org/opendev/infra-manual/latest/developers.html#development-workflow Pull requests submitted through GitHub will be ignored. diff --git a/ChangeLog b/ChangeLog index 67387e8..0e1da47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,25 @@ CHANGES ======= +5.5.0 +----- + +* Remove bdist\_wininst support +* Increase integration test timeout +* Add Release Notes to documentation +* Cleanup old legacy devstack-gate jobs +* Begin work to modernize pbr's integration testing +* Re-add ChangeLog +* Update some url to use opendev.org +* Support newer openstackdocstheme +* Use easy\_install.ScriptWriter.get\_header() +* Remove neutron-fwaas from the jobs' required project +* Update python requires packaging metadata for package +* trivial: Improve logging of run commands +* Map requires-python to python-requires +* Update hacking +* Add support for virtualenv 20.x + 5.4.5 ----- diff --git a/PKG-INFO b/PKG-INFO index 3e9bc58..554c233 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pbr -Version: 5.4.5 +Version: 5.5.0 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack @@ -8,7 +8,7 @@ Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ -Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/ +Project-URL: Source Code, https://opendev.org/openstack/pbr Description: Introduction ============ @@ -43,9 +43,10 @@ Description: Introduction * License: Apache License, Version 2.0 * Documentation: https://docs.openstack.org/pbr/latest/ - * Source: https://git.openstack.org/cgit/openstack-dev/pbr + * Source: https://opendev.org/openstack/pbr * Bugs: https://bugs.launchpad.net/pbr - * Change Log: https://docs.openstack.org/pbr/latest/user/history.html + * Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html + * ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 @@ -68,4 +69,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Requires-Python: >=2.6 Description-Content-Type: text/x-rst; charset=UTF-8 diff --git a/README.rst b/README.rst index 9c1df73..0b6c229 100644 --- a/README.rst +++ b/README.rst @@ -32,9 +32,10 @@ them as quickly as possible. * License: Apache License, Version 2.0 * Documentation: https://docs.openstack.org/pbr/latest/ -* Source: https://git.openstack.org/cgit/openstack-dev/pbr +* Source: https://opendev.org/openstack/pbr * Bugs: https://bugs.launchpad.net/pbr -* Change Log: https://docs.openstack.org/pbr/latest/user/history.html +* Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html +* ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 diff --git a/doc/source/conf.py b/doc/source/conf.py index 13f63a0..aa51538 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -17,10 +17,17 @@ except ImportError: openstackdocstheme = None # openstackdocstheme options + +# Deprecated options for docstheme < 2.2.0, can be removed once +# pbr stops supporting py27. repository_name = 'openstack/pbr' bug_project = 'pbr' bug_tag = '' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +# New options with openstackdocstheme >=2.2.0 +openstackdocs_repo_name = 'openstack/pbr' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'pbr' +openstackdocs_bug_tag = '' # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. diff --git a/doc/source/user/history.rst b/doc/source/user/history.rst new file mode 100644 index 0000000..f69be70 --- /dev/null +++ b/doc/source/user/history.rst @@ -0,0 +1 @@ +.. include:: ../../../ChangeLog diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index 0629e2e..0c5fec2 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -9,3 +9,5 @@ packagers semver compatibility + releasenotes + history diff --git a/doc/source/user/releasenotes.rst b/doc/source/user/releasenotes.rst new file mode 100644 index 0000000..6647c66 --- /dev/null +++ b/doc/source/user/releasenotes.rst @@ -0,0 +1,6 @@ +=============== + Release Notes +=============== + +.. include:: ../../../RELEASENOTES.rst + :start-line: 4 diff --git a/doc/source/user/using.rst b/doc/source/user/using.rst index 3fa7569..b9659d0 100644 --- a/doc/source/user/using.rst +++ b/doc/source/user/using.rst @@ -57,7 +57,7 @@ versions of `setuptools`__. A simple sample can be found in *pbr*'s own project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/ Documentation = https://docs.openstack.org/pbr/ - Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ + Source Code = https://opendev.org/openstack/pbr license = Apache-2 classifier = Development Status :: 4 - Beta diff --git a/lower-constraints.txt b/lower-constraints.txt index fc576a5..46ad80b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -22,7 +22,7 @@ pytz==2013.6 PyYAML==3.12 reno==2.5.0 requests==2.14.2 -six==1.10.0 +six==1.12.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-apidoc==0.2.0 @@ -34,4 +34,4 @@ testscenarios==0.4 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 -virtualenv==14.0.6 +virtualenv==20.0.3 diff --git a/pbr.egg-info/PKG-INFO b/pbr.egg-info/PKG-INFO index 3e9bc58..554c233 100644 --- a/pbr.egg-info/PKG-INFO +++ b/pbr.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pbr -Version: 5.4.5 +Version: 5.5.0 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack @@ -8,7 +8,7 @@ Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ -Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/ +Project-URL: Source Code, https://opendev.org/openstack/pbr Description: Introduction ============ @@ -43,9 +43,10 @@ Description: Introduction * License: Apache License, Version 2.0 * Documentation: https://docs.openstack.org/pbr/latest/ - * Source: https://git.openstack.org/cgit/openstack-dev/pbr + * Source: https://opendev.org/openstack/pbr * Bugs: https://bugs.launchpad.net/pbr - * Change Log: https://docs.openstack.org/pbr/latest/user/history.html + * Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html + * ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html .. _d2to1: https://pypi.python.org/pypi/d2to1 .. _distutils2: https://pypi.python.org/pypi/Distutils2 @@ -68,4 +69,5 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Requires-Python: >=2.6 Description-Content-Type: text/x-rst; charset=UTF-8 diff --git a/pbr.egg-info/SOURCES.txt b/pbr.egg-info/SOURCES.txt index 97f7167..46ba38e 100644 --- a/pbr.egg-info/SOURCES.txt +++ b/pbr.egg-info/SOURCES.txt @@ -19,8 +19,10 @@ doc/source/contributor/index.rst doc/source/reference/index.rst doc/source/user/compatibility.rst doc/source/user/features.rst +doc/source/user/history.rst doc/source/user/index.rst doc/source/user/packagers.rst +doc/source/user/releasenotes.rst doc/source/user/semver.rst doc/source/user/using.rst pbr/__init__.py @@ -88,10 +90,9 @@ pbr/tests/testpackage/pbr_testpackage/wsgi.py pbr/tests/testpackage/pbr_testpackage/package_data/1.txt pbr/tests/testpackage/pbr_testpackage/package_data/2.txt pbr/tests/testpackage/src/testext.c -playbooks/legacy/pbr-installation-devstack/post.yaml -playbooks/legacy/pbr-installation-devstack/run.yaml -playbooks/legacy/pbr-installation-upstream-devstack/post.yaml -playbooks/legacy/pbr-installation-upstream-devstack/run.yaml +playbooks/pbr-installation-openstack/pre.yaml +playbooks/pbr-installation-openstack/run.yaml +releasenotes/notes/bdist_wininst-removal-4a1c7c3a9f08238d.yaml releasenotes/notes/cmd-e6664dcbd42d3935.yaml releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml diff --git a/pbr/packaging.py b/pbr/packaging.py index a697992..90b9933 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -431,9 +431,9 @@ def generate_script(group, entry_point, header, template): def override_get_script_args( - dist, executable=os.path.normpath(sys.executable), is_wininst=False): + dist, executable=os.path.normpath(sys.executable)): """Override entrypoints console_script.""" - header = easy_install.get_script_header("", executable, is_wininst) + header = easy_install.get_script_header("", executable) for group, template in ENTRY_POINTS_MAP.items(): for name, ep in dist.get_entry_map(group).items(): yield (name, generate_script(group, ep, header, template)) @@ -455,8 +455,12 @@ class LocalInstallScripts(install_scripts.install_scripts): """Intercepts console scripts entry_points.""" command_name = 'install_scripts' - def _make_wsgi_scripts_only(self, dist, executable, is_wininst): - header = easy_install.get_script_header("", executable, is_wininst) + def _make_wsgi_scripts_only(self, dist, executable): + # get_script_header() is deprecated since Setuptools 12.0 + try: + header = easy_install.ScriptWriter.get_header("", executable) + except AttributeError: + header = easy_install.get_script_header("", executable) wsgi_script_template = ENTRY_POINTS_MAP['wsgi_scripts'] for name, ep in dist.get_entry_map('wsgi_scripts').items(): content = generate_script( @@ -482,16 +486,12 @@ class LocalInstallScripts(install_scripts.install_scripts): bs_cmd = self.get_finalized_command('build_scripts') executable = getattr( bs_cmd, 'executable', easy_install.sys_executable) - is_wininst = getattr( - self.get_finalized_command("bdist_wininst"), '_is_running', False - ) - if 'bdist_wheel' in self.distribution.have_run: # We're building a wheel which has no way of generating mod_wsgi # scripts for us. Let's build them. # NOTE(sigmavirus24): This needs to happen here because, as the # comment below indicates, no_ep is True when building a wheel. - self._make_wsgi_scripts_only(dist, executable, is_wininst) + self._make_wsgi_scripts_only(dist, executable) if self.no_ep: # no_ep is True if we're installing into an .egg file or building @@ -505,7 +505,7 @@ class LocalInstallScripts(install_scripts.install_scripts): get_script_args = easy_install.get_script_args executable = '"%s"' % executable - for args in get_script_args(dist, executable, is_wininst): + for args in get_script_args(dist, executable): self.write_script(*args) diff --git a/pbr/tests/base.py b/pbr/tests/base.py index ea4a458..c94af56 100644 --- a/pbr/tests/base.py +++ b/pbr/tests/base.py @@ -202,12 +202,15 @@ def _run_cmd(args, cwd): :param cwd: The directory to run the comamnd in. :return: ((stdout, stderr), returncode) """ + print('Running %s' % ' '.join(args)) p = subprocess.Popen( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd) streams = tuple(s.decode('latin1').strip() for s in p.communicate()) - for stream_content in streams: - print(stream_content) + print('STDOUT:') + print(streams[0]) + print('STDERR:') + print(streams[1]) return (streams) + (p.returncode,) diff --git a/pbr/tests/test_commands.py b/pbr/tests/test_commands.py index 51e2711..7cf3fa9 100644 --- a/pbr/tests/test_commands.py +++ b/pbr/tests/test_commands.py @@ -78,7 +78,7 @@ class TestCommands(base.BaseTestCase): stdout, stderr, return_code = self.run_pbr('freeze') self.assertEqual(0, return_code) pkgs = [] - for l in stdout.split('\n'): - pkgs.append(l.split('==')[0].lower()) + for line in stdout.split('\n'): + pkgs.append(line.split('==')[0].lower()) pkgs_sort = sorted(pkgs[:]) self.assertEqual(pkgs_sort, pkgs) diff --git a/pbr/tests/test_core.py b/pbr/tests/test_core.py index ccd14ab..edb7c7b 100644 --- a/pbr/tests/test_core.py +++ b/pbr/tests/test_core.py @@ -40,6 +40,7 @@ import glob import os +import sys import tarfile import fixtures @@ -113,6 +114,12 @@ class TestCore(base.BaseTestCase): def test_console_script_develop(self): """Test that we develop a non-pkg-resources console script.""" + if sys.version_info < (3, 0): + self.skipTest( + 'Fails with recent virtualenv due to ' + 'https://github.com/pypa/virtualenv/issues/1638' + ) + if os.name == 'nt': self.skipTest('Windows support is passthrough') diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py index 8e96f21..25473b0 100644 --- a/pbr/tests/test_integration.py +++ b/pbr/tests/test_integration.py @@ -11,7 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +try: + import configparser +except ImportError: + import ConfigParser as configparser import os.path +import pkg_resources import shlex import sys @@ -77,19 +82,35 @@ class TestIntegration(base.BaseTestCase): # We don't break these into separate tests because we'd need separate # source dirs to isolate from side effects of running pip, and the # overheads of setup would start to beat the benefits of parallelism. - self.useFixture(base.CapturedSubprocess( - 'sync-req', - ['python', 'update.py', os.path.join(REPODIR, self.short_name)], - cwd=os.path.join(REPODIR, 'requirements'))) - self.useFixture(base.CapturedSubprocess( - 'commit-requirements', - 'git diff --quiet || git commit -amrequirements', - cwd=os.path.join(REPODIR, self.short_name), shell=True)) - path = os.path.join( - self.useFixture(fixtures.TempDir()).path, 'project') - self.useFixture(base.CapturedSubprocess( - 'clone', - ['git', 'clone', os.path.join(REPODIR, self.short_name), path])) + path = os.path.join(REPODIR, self.short_name) + setup_cfg = os.path.join(path, 'setup.cfg') + project_name = pkg_resources.safe_name(self.short_name).lower() + # These projects should all have setup.cfg files but we'll be careful + if os.path.exists(setup_cfg): + config = configparser.ConfigParser() + config.read(setup_cfg) + if config.has_section('metadata'): + raw_name = config.get('metadata', 'name', + fallback='notapackagename') + # Technically we should really only need to use the raw + # name because all our projects should be good and use + # normalized names but they don't... + project_name = pkg_resources.safe_name(raw_name).lower() + constraints = os.path.join(REPODIR, 'requirements', + 'upper-constraints.txt') + tmp_constraints = os.path.join( + self.useFixture(fixtures.TempDir()).path, + 'upper-constraints.txt') + # We need to filter out the package we are installing to avoid + # conflicts with the constraints. + with open(constraints, 'r') as src: + with open(tmp_constraints, 'w') as dest: + for line in src: + constraint = line.split('===')[0] + if project_name != constraint: + dest.write(line) + pip_cmd = PIP_CMD + ['-c', tmp_constraints] + venv = self.useFixture( test_packaging.Venv('sdist', modules=['pip', 'wheel', PBRVERSION], @@ -105,7 +126,7 @@ class TestIntegration(base.BaseTestCase): filename = os.path.join( path, 'dist', os.listdir(os.path.join(path, 'dist'))[0]) self.useFixture(base.CapturedSubprocess( - 'tarball', [python] + PIP_CMD + [filename])) + 'tarball', [python] + pip_cmd + [filename])) venv = self.useFixture( test_packaging.Venv('install-git', modules=['pip', 'wheel', PBRVERSION], @@ -113,7 +134,7 @@ class TestIntegration(base.BaseTestCase): root = venv.path python = venv.python self.useFixture(base.CapturedSubprocess( - 'install-git', [python] + PIP_CMD + ['git+file://' + path])) + 'install-git', [python] + pip_cmd + ['git+file://' + path])) if self.short_name == 'nova': found = False for _, _, filenames in os.walk(root): @@ -127,7 +148,7 @@ class TestIntegration(base.BaseTestCase): root = venv.path python = venv.python self.useFixture(base.CapturedSubprocess( - 'install-e', [python] + PIP_CMD + ['-e', path])) + 'install-e', [python] + pip_cmd + ['-e', path])) class TestInstallWithoutPbr(base.BaseTestCase): @@ -188,12 +209,16 @@ class TestInstallWithoutPbr(base.BaseTestCase): class TestMarkersPip(base.BaseTestCase): scenarios = [ - ('pip-1.5', {'modules': ['pip>=1.5,<1.6']}), - ('pip-6.0', {'modules': ['pip>=6.0,<6.1']}), ('pip-latest', {'modules': ['pip']}), - ('setuptools-EL7', {'modules': ['pip==1.4.1', 'setuptools==0.9.8']}), - ('setuptools-Trusty', {'modules': ['pip==1.5', 'setuptools==2.2']}), - ('setuptools-minimum', {'modules': ['pip==1.5', 'setuptools==0.7.2']}), + ('setuptools-Bionic', { + 'modules': ['pip==9.0.1', 'setuptools==39.0.1']}), + ('setuptools-Stretch', { + 'modules': ['pip==9.0.1', 'setuptools==33.1.1']}), + ('setuptools-EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}), + ('setuptools-Buster', { + 'modules': ['pip==18.1', 'setuptools==40.8.0']}), + ('setuptools-Focal', { + 'modules': ['pip==20.0.2', 'setuptools==45.2.0']}), ] @testtools.skipUnless( @@ -240,25 +265,17 @@ class TestLTSSupport(base.BaseTestCase): # These versions come from the versions installed from the 'virtualenv' # command from the 'python-virtualenv' package. scenarios = [ - ('EL7', {'modules': ['pip==1.4.1', 'setuptools==0.9.8'], - 'py3support': True}), # And EPEL6 - ('Trusty', {'modules': ['pip==1.5', 'setuptools==2.2'], - 'py3support': True}), - ('Jessie', {'modules': ['pip==1.5.6', 'setuptools==5.5.1'], - 'py3support': True}), - # Wheezy has pip1.1, which cannot be called with '-m pip' - # So we'll use a different version of pip here. - ('WheezyPrecise', {'modules': ['pip==1.4.1', 'setuptools==0.6c11'], - 'py3support': False}) + ('Bionic', {'modules': ['pip==9.0.1', 'setuptools==39.0.1']}), + ('Stretch', {'modules': ['pip==9.0.1', 'setuptools==33.1.1']}), + ('EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}), + ('Buster', {'modules': ['pip==18.1', 'setuptools==40.8.0']}), + ('Focal', {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}), ] @testtools.skipUnless( os.environ.get('PBR_INTEGRATION', None) == '1', 'integration tests not enabled') def test_lts_venv_default_versions(self): - if (sys.version_info[0] == 3 and not self.py3support): - self.skipTest('This combination will not install with py3, ' - 'skipping test') venv = self.useFixture( test_packaging.Venv('setuptools', modules=self.modules)) bin_python = venv.python diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py index 07be547..3a70319 100644 --- a/pbr/tests/test_packaging.py +++ b/pbr/tests/test_packaging.py @@ -183,7 +183,8 @@ class Venv(fixtures.Fixture): def _setUp(self): path = self.useFixture(fixtures.TempDir()).path - virtualenv.create_environment(path, clear=True) + virtualenv.cli_run([path]) + python = os.path.join(path, 'bin', 'python') command = [python] + self.pip_cmd + ['-U'] if self.modules and len(self.modules) > 0: diff --git a/pbr/tests/test_util.py b/pbr/tests/test_util.py index 1cbb2d2..0a02fc1 100644 --- a/pbr/tests/test_util.py +++ b/pbr/tests/test_util.py @@ -103,12 +103,12 @@ class TestMapFieldsParsingScenarios(base.BaseTestCase): project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/ Documentation = https://docs.openstack.org/pbr/ - Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ + Source Code = https://opendev.org/openstack/pbr """, # noqa: E501 'expected_project_urls': { 'Bug Tracker': 'https://bugs.launchpad.net/pbr/', 'Documentation': 'https://docs.openstack.org/pbr/', - 'Source Code': 'https://git.openstack.org/cgit/openstack-dev/pbr/', # noqa: E501 + 'Source Code': 'https://opendev.org/openstack/pbr', }, }), ('query_parameters', { @@ -146,7 +146,7 @@ class TestKeywordsParsingScenarios(base.BaseTestCase): three """, # noqa: E501 'expected_keywords': ['one', 'two', 'three'], - }, + }, ), ('inline_keywords', { 'config_text': """ diff --git a/pbr/tests/testpackage/setup.cfg b/pbr/tests/testpackage/setup.cfg index 3929f0d..e323252 100644 --- a/pbr/tests/testpackage/setup.cfg +++ b/pbr/tests/testpackage/setup.cfg @@ -9,13 +9,13 @@ home-page = http://pypi.python.org/pypi/pbr project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/ Documentation = https://docs.openstack.org/pbr/ - Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ + Source Code = https://opendev.org/openstack/pbr summary = Test package for testing pbr description-file = README.txt CHANGES.txt description-content-type = text/plain; charset=UTF-8 -requires-python = >=2.5 +python-requires = >=2.5 requires-dist = setuptools diff --git a/pbr/util.py b/pbr/util.py index 1e9fdc4..89f5088 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -114,6 +114,7 @@ D1_D2_SETUP_ARGS = { "install_requires": ("metadata", "requires_dist"), "setup_requires": ("metadata", "setup_requires_dist"), "python_requires": ("metadata",), + "requires_python": ("metadata", "python_requires"), "provides": ("metadata", "provides_dist"), # ** "provides_extras": ("metadata",), "obsoletes": ("metadata", "obsoletes_dist"), # ** @@ -548,7 +549,7 @@ def get_extension_modules(config): else: # Backwards compatibility for old syntax; don't use this though labels = section.split('=', 1) - labels = [l.strip() for l in labels] + labels = [label.strip() for label in labels] if (len(labels) == 2) and (labels[0] == 'extension'): ext_args = {} for field in EXTENSION_FIELDS: diff --git a/playbooks/legacy/pbr-installation-devstack/post.yaml b/playbooks/legacy/pbr-installation-devstack/post.yaml deleted file mode 100644 index e07f551..0000000 --- a/playbooks/legacy/pbr-installation-devstack/post.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/pbr-installation-devstack/run.yaml b/playbooks/legacy/pbr-installation-devstack/run.yaml deleted file mode 100644 index 96f863a..0000000 --- a/playbooks/legacy/pbr-installation-devstack/run.yaml +++ /dev/null @@ -1,136 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-pbr-installation-dsvm from old job gate-pbr-installation-dsvm-ubuntu-xenial - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - cat > clonemap.yaml << EOF - clonemap: - - name: openstack/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - https://opendev.org \ - openstack/devstack-gate - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - # Define the entire projects list here so that what we - # test requirements against is independent of what d-g - # thinks is relevant. - export PROJECTS="openstack/devstack-gate $PROJECTS" - export PROJECTS="openstack/devstack $PROJECTS" - export PROJECTS="openstack/grenade $PROJECTS" - export PROJECTS="openstack/pbr $PROJECTS" - export PROJECTS="openstack/tripleo-ci $PROJECTS" - export PROJECTS="openstack/aodh $PROJECTS" - export PROJECTS="openstack/automaton $PROJECTS" - export PROJECTS="openstack/ceilometer $PROJECTS" - export PROJECTS="openstack/ceilometermiddleware $PROJECTS" - export PROJECTS="openstack/cinder $PROJECTS" - export PROJECTS="openstack/cliff $PROJECTS" - export PROJECTS="openstack/debtcollector $PROJECTS" - export PROJECTS="openstack/dib-utils $PROJECTS" - export PROJECTS="openstack/diskimage-builder $PROJECTS" - export PROJECTS="openstack/django_openstack_auth $PROJECTS" - export PROJECTS="openstack/futurist $PROJECTS" - export PROJECTS="openstack/glance $PROJECTS" - export PROJECTS="openstack/glance_store $PROJECTS" - export PROJECTS="openstack/heat $PROJECTS" - export PROJECTS="openstack/heat-cfntools $PROJECTS" - export PROJECTS="openstack/heat-templates $PROJECTS" - export PROJECTS="openstack/horizon $PROJECTS" - export PROJECTS="openstack/ironic $PROJECTS" - export PROJECTS="openstack/ironic-lib $PROJECTS" - export PROJECTS="openstack/ironic-python-agent $PROJECTS" - export PROJECTS="openstack/keystone $PROJECTS" - export PROJECTS="openstack/keystoneauth $PROJECTS" - export PROJECTS="openstack/keystonemiddleware $PROJECTS" - export PROJECTS="openstack/manila $PROJECTS" - export PROJECTS="openstack/manila-ui $PROJECTS" - export PROJECTS="openstack/zaqar $PROJECTS" - export PROJECTS="openstack/neutron $PROJECTS" - export PROJECTS="openstack/neutron-fwaas $PROJECTS" - export PROJECTS="openstack/octavia $PROJECTS" - export PROJECTS="openstack/neutron-vpnaas $PROJECTS" - export PROJECTS="openstack/nova $PROJECTS" - export PROJECTS="openstack/os-apply-config $PROJECTS" - export PROJECTS="openstack/os-brick $PROJECTS" - export PROJECTS="openstack/os-client-config $PROJECTS" - export PROJECTS="openstack/os-collect-config $PROJECTS" - export PROJECTS="openstack/os-net-config $PROJECTS" - export PROJECTS="openstack/os-refresh-config $PROJECTS" - export PROJECTS="openstack/osc-lib $PROJECTS" - export PROJECTS="openstack/oslo.cache $PROJECTS" - export PROJECTS="openstack/oslo.concurrency $PROJECTS" - export PROJECTS="openstack/oslo.config $PROJECTS" - export PROJECTS="openstack/oslo.context $PROJECTS" - export PROJECTS="openstack/oslo.db $PROJECTS" - export PROJECTS="openstack/oslo.i18n $PROJECTS" - export PROJECTS="openstack/oslo.log $PROJECTS" - export PROJECTS="openstack/oslo.messaging $PROJECTS" - export PROJECTS="openstack/oslo.middleware $PROJECTS" - export PROJECTS="openstack/oslo.policy $PROJECTS" - export PROJECTS="openstack/oslo.reports $PROJECTS" - export PROJECTS="openstack/oslo.rootwrap $PROJECTS" - export PROJECTS="openstack/oslo.utils $PROJECTS" - export PROJECTS="openstack/oslo.serialization $PROJECTS" - export PROJECTS="openstack/oslo.service $PROJECTS" - export PROJECTS="openstack/oslo.versionedobjects $PROJECTS" - export PROJECTS="openstack/oslo.vmware $PROJECTS" - export PROJECTS="openstack/pycadf $PROJECTS" - export PROJECTS="openstack/python-cinderclient $PROJECTS" - export PROJECTS="openstack/python-glanceclient $PROJECTS" - export PROJECTS="openstack/python-heatclient $PROJECTS" - export PROJECTS="openstack/python-ironicclient $PROJECTS" - export PROJECTS="openstack/python-keystoneclient $PROJECTS" - export PROJECTS="openstack/python-manilaclient $PROJECTS" - export PROJECTS="openstack/python-zaqarclient $PROJECTS" - export PROJECTS="openstack/python-neutronclient $PROJECTS" - export PROJECTS="openstack/python-novaclient $PROJECTS" - export PROJECTS="openstack/python-openstackclient $PROJECTS" - export PROJECTS="openstack/python-saharaclient $PROJECTS" - export PROJECTS="openstack/python-swiftclient $PROJECTS" - export PROJECTS="openstack/python-troveclient $PROJECTS" - export PROJECTS="openstack/requirements $PROJECTS" - export PROJECTS="openstack/sahara $PROJECTS" - export PROJECTS="openstack/sahara-dashboard $PROJECTS" - export PROJECTS="openstack/stevedore $PROJECTS" - export PROJECTS="openstack/swift $PROJECTS" - export PROJECTS="openstack/taskflow $PROJECTS" - export PROJECTS="openstack/tempest $PROJECTS" - export PROJECTS="openstack/tooz $PROJECTS" - export PROJECTS="openstack/tripleo-heat-templates $PROJECTS" - export PROJECTS="openstack/tripleo-image-elements $PROJECTS" - export PROJECTS="openstack/trove $PROJECTS" - export PROJECTS="openstack/trove-dashboard $PROJECTS" - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=0 - export DEVSTACK_GATE_EXERCISES=0 - export DEVSTACK_GATE_REQS_INTEGRATION=1 - export PIP_PROCESS_DEPENDENCY_LINKS=1 - if [ "" = "-upstream" ]; then - export PBR_PIP_VERSION=git+https://github.com/pypa/pip.git#egg=pip - fi - function gate_hook { - set -x - bash -xe $BASE/new/pbr/tools/integration.sh $(cat $BASE/new/requirements/projects.txt) - } - export -f gate_hook - cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh - ./safe-devstack-vm-gate-wrap.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/pbr-installation-upstream-devstack/post.yaml b/playbooks/legacy/pbr-installation-upstream-devstack/post.yaml deleted file mode 100644 index e07f551..0000000 --- a/playbooks/legacy/pbr-installation-upstream-devstack/post.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/pbr-installation-upstream-devstack/run.yaml b/playbooks/legacy/pbr-installation-upstream-devstack/run.yaml deleted file mode 100644 index 544dd43..0000000 --- a/playbooks/legacy/pbr-installation-upstream-devstack/run.yaml +++ /dev/null @@ -1,136 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-pbr-installation-dsvm-upstream from old job gate-pbr-installation-dsvm-upstream-ubuntu-xenial - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - cat > clonemap.yaml << EOF - clonemap: - - name: openstack/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - https://opendev.org \ - openstack/devstack-gate - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - # Define the entire projects list here so that what we - # test requirements against is independent of what d-g - # thinks is relevant. - export PROJECTS="openstack/devstack-gate $PROJECTS" - export PROJECTS="openstack/devstack $PROJECTS" - export PROJECTS="openstack/grenade $PROJECTS" - export PROJECTS="openstack/pbr $PROJECTS" - export PROJECTS="openstack/tripleo-ci $PROJECTS" - export PROJECTS="openstack/aodh $PROJECTS" - export PROJECTS="openstack/automaton $PROJECTS" - export PROJECTS="openstack/ceilometer $PROJECTS" - export PROJECTS="openstack/ceilometermiddleware $PROJECTS" - export PROJECTS="openstack/cinder $PROJECTS" - export PROJECTS="openstack/cliff $PROJECTS" - export PROJECTS="openstack/debtcollector $PROJECTS" - export PROJECTS="openstack/dib-utils $PROJECTS" - export PROJECTS="openstack/diskimage-builder $PROJECTS" - export PROJECTS="openstack/django_openstack_auth $PROJECTS" - export PROJECTS="openstack/futurist $PROJECTS" - export PROJECTS="openstack/glance $PROJECTS" - export PROJECTS="openstack/glance_store $PROJECTS" - export PROJECTS="openstack/heat $PROJECTS" - export PROJECTS="openstack/heat-cfntools $PROJECTS" - export PROJECTS="openstack/heat-templates $PROJECTS" - export PROJECTS="openstack/horizon $PROJECTS" - export PROJECTS="openstack/ironic $PROJECTS" - export PROJECTS="openstack/ironic-lib $PROJECTS" - export PROJECTS="openstack/ironic-python-agent $PROJECTS" - export PROJECTS="openstack/keystone $PROJECTS" - export PROJECTS="openstack/keystoneauth $PROJECTS" - export PROJECTS="openstack/keystonemiddleware $PROJECTS" - export PROJECTS="openstack/manila $PROJECTS" - export PROJECTS="openstack/manila-ui $PROJECTS" - export PROJECTS="openstack/zaqar $PROJECTS" - export PROJECTS="openstack/neutron $PROJECTS" - export PROJECTS="openstack/neutron-fwaas $PROJECTS" - export PROJECTS="openstack/octavia $PROJECTS" - export PROJECTS="openstack/neutron-vpnaas $PROJECTS" - export PROJECTS="openstack/nova $PROJECTS" - export PROJECTS="openstack/os-apply-config $PROJECTS" - export PROJECTS="openstack/os-brick $PROJECTS" - export PROJECTS="openstack/os-client-config $PROJECTS" - export PROJECTS="openstack/os-collect-config $PROJECTS" - export PROJECTS="openstack/os-net-config $PROJECTS" - export PROJECTS="openstack/os-refresh-config $PROJECTS" - export PROJECTS="openstack/osc-lib $PROJECTS" - export PROJECTS="openstack/oslo.cache $PROJECTS" - export PROJECTS="openstack/oslo.concurrency $PROJECTS" - export PROJECTS="openstack/oslo.config $PROJECTS" - export PROJECTS="openstack/oslo.context $PROJECTS" - export PROJECTS="openstack/oslo.db $PROJECTS" - export PROJECTS="openstack/oslo.i18n $PROJECTS" - export PROJECTS="openstack/oslo.log $PROJECTS" - export PROJECTS="openstack/oslo.messaging $PROJECTS" - export PROJECTS="openstack/oslo.middleware $PROJECTS" - export PROJECTS="openstack/oslo.policy $PROJECTS" - export PROJECTS="openstack/oslo.reports $PROJECTS" - export PROJECTS="openstack/oslo.rootwrap $PROJECTS" - export PROJECTS="openstack/oslo.utils $PROJECTS" - export PROJECTS="openstack/oslo.serialization $PROJECTS" - export PROJECTS="openstack/oslo.service $PROJECTS" - export PROJECTS="openstack/oslo.versionedobjects $PROJECTS" - export PROJECTS="openstack/oslo.vmware $PROJECTS" - export PROJECTS="openstack/pycadf $PROJECTS" - export PROJECTS="openstack/python-cinderclient $PROJECTS" - export PROJECTS="openstack/python-glanceclient $PROJECTS" - export PROJECTS="openstack/python-heatclient $PROJECTS" - export PROJECTS="openstack/python-ironicclient $PROJECTS" - export PROJECTS="openstack/python-keystoneclient $PROJECTS" - export PROJECTS="openstack/python-manilaclient $PROJECTS" - export PROJECTS="openstack/python-zaqarclient $PROJECTS" - export PROJECTS="openstack/python-neutronclient $PROJECTS" - export PROJECTS="openstack/python-novaclient $PROJECTS" - export PROJECTS="openstack/python-openstackclient $PROJECTS" - export PROJECTS="openstack/python-saharaclient $PROJECTS" - export PROJECTS="openstack/python-swiftclient $PROJECTS" - export PROJECTS="openstack/python-troveclient $PROJECTS" - export PROJECTS="openstack/requirements $PROJECTS" - export PROJECTS="openstack/sahara $PROJECTS" - export PROJECTS="openstack/sahara-dashboard $PROJECTS" - export PROJECTS="openstack/stevedore $PROJECTS" - export PROJECTS="openstack/swift $PROJECTS" - export PROJECTS="openstack/taskflow $PROJECTS" - export PROJECTS="openstack/tempest $PROJECTS" - export PROJECTS="openstack/tooz $PROJECTS" - export PROJECTS="openstack/tripleo-heat-templates $PROJECTS" - export PROJECTS="openstack/tripleo-image-elements $PROJECTS" - export PROJECTS="openstack/trove $PROJECTS" - export PROJECTS="openstack/trove-dashboard $PROJECTS" - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=0 - export DEVSTACK_GATE_EXERCISES=0 - export DEVSTACK_GATE_REQS_INTEGRATION=1 - export PIP_PROCESS_DEPENDENCY_LINKS=1 - if [ "-upstream" = "-upstream" ]; then - export PBR_PIP_VERSION=git+https://github.com/pypa/pip.git#egg=pip - fi - function gate_hook { - set -x - bash -xe $BASE/new/pbr/tools/integration.sh $(cat $BASE/new/requirements/projects.txt) - } - export -f gate_hook - cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh - ./safe-devstack-vm-gate-wrap.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/pbr-installation-openstack/pre.yaml b/playbooks/pbr-installation-openstack/pre.yaml new file mode 100644 index 0000000..4737f6a --- /dev/null +++ b/playbooks/pbr-installation-openstack/pre.yaml @@ -0,0 +1,4 @@ +- hosts: all + roles: + - ensure-pip + - ensure-virtualenv diff --git a/playbooks/pbr-installation-openstack/run.yaml b/playbooks/pbr-installation-openstack/run.yaml new file mode 100644 index 0000000..adf7665 --- /dev/null +++ b/playbooks/pbr-installation-openstack/run.yaml @@ -0,0 +1,6 @@ +- hosts: all + tasks: + - shell: + cmd: | + export PBR_PIP_VERSION="{{ pbr_pip_version }}" + bash -xe /home/zuul/src/opendev.org/openstack/pbr/tools/integration.sh $(cat /home/zuul/src/opendev.org/openstack/requirements/projects.txt) diff --git a/releasenotes/notes/bdist_wininst-removal-4a1c7c3a9f08238d.yaml b/releasenotes/notes/bdist_wininst-removal-4a1c7c3a9f08238d.yaml new file mode 100644 index 0000000..c3e9410 --- /dev/null +++ b/releasenotes/notes/bdist_wininst-removal-4a1c7c3a9f08238d.yaml @@ -0,0 +1,9 @@ +--- +other: + - | + Support to generate bdist_wininst packages has been removed. As of Python + 3.8 and Setuptools 47.2 it's deprecated in favor of just using wheels for + Windows platform packaging. See + https://discuss.python.org/t/deprecate-bdist-wininst/ and + https://discuss.python.org/t/remove-distutils-bdist-wininst-command/ for + more details. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 56f7ecd..0c3627c 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -41,13 +41,16 @@ release = '' # a list of builtin themes. html_theme = 'openstackdocs' -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - - # -- Options for openstackdocstheme --------------------------------------- -repository_name = 'openstack-dev/pbr' +# Deprecated options for openstackdocstheme < 2.2.0, can be removed once +# pbr stops supporting py27. +repository_name = 'openstack/pbr' bug_project = 'pbr' bug_tag = '' + +# New options with openstackdocstheme >=2.2.0 +openstackdocs_repo_name = 'openstack/pbr' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'pbr' +openstackdocs_bug_tag = '' diff --git a/setup.cfg b/setup.cfg index 0777964..141fc7f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,8 +10,8 @@ home-page = https://docs.openstack.org/pbr/latest/ project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/ Documentation = https://docs.openstack.org/pbr/ - Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/ -requires-python = >=2.6 + Source Code = https://opendev.org/openstack/pbr +python-requires = >=2.6 classifier = Development Status :: 5 - Production/Stable Environment :: Console diff --git a/test-requirements.txt b/test-requirements.txt index 09efec0..a3c5a11 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,14 +4,15 @@ wheel>=0.32.0 # MIT fixtures>=3.0.0 # Apache-2.0/BSD -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=1.1.0,<4.0.0 # Apache-2.0 mock>=2.0.0 # BSD -six>=1.10.0 # MIT -stestr>=2.1.0 # Apache-2.0 +six>=1.12.0 # MIT +stestr>=2.1.0,<3.0;python_version=='2.7' # Apache-2.0 +stestr>=2.1.0;python_version>='3.0' # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT -virtualenv>=14.0.6 # MIT +virtualenv>=20.0.3 # MIT coverage!=4.4,>=4.0 # Apache-2.0 # optionally exposed by distutils commands diff --git a/tools/integration.sh b/tools/integration.sh index 6c4dc16..566fc50 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -13,7 +13,7 @@ function mkvenv { venv=$1 rm -rf $venv - virtualenv $venv + virtualenv -p python3 $venv $venv/bin/pip install $PIPFLAGS -U $PIPVERSION wheel requests # If a change to PBR is being tested, preinstall the wheel for it @@ -22,11 +22,11 @@ function mkvenv { fi } -# BASE should be a directory with a subdir called "new" and in that +# BASE should be a directory with a subdir called "openstack" and in that # dir, there should be a git repository for every entry in PROJECTS -BASE=${BASE:-/opt/stack} +BASE=${BASE:-/home/zuul/src/opendev.org/} -REPODIR=${REPODIR:-$BASE/new} +REPODIR=${REPODIR:-$BASE/openstack} # TODO: Figure out how to get this on to the box properly sudo apt-get update @@ -97,10 +97,6 @@ name = test_project [entry_points] console_scripts = test_cmd = test_project:main - -[global] -setup-hooks = - pbr.hooks.setup_hook EOF cat < setup.py @@ -115,18 +111,19 @@ from socket import error as SocketError try: setuptools.setup( setup_requires=['pbr'], - pbr=True) + pbr=True, + ) except (SocketError, Timeout): setuptools.setup( setup_requires=['pbr'], - pbr=True) - + pbr=True, + ) EOF mkdir test_project cat < test_project/__init__.py def main(): - print "Test cmd" + print("Test cmd") EOF epvenv=$eptest/venv @@ -163,8 +160,10 @@ export PBRVERSION export PROJECTS export REPODIR export WHEELHOUSE -export OS_TEST_TIMEOUT=600 +export OS_TEST_TIMEOUT=900 cd $REPODIR/pbr -tox -epy27 --notest -.tox/py27/bin/python -m pip install ${REPODIR}/requirements -tox -epy27 -- test_integration +mkvenv .venv +source .venv/bin/activate +pip install -r test-requirements.txt +pip install ${REPODIR}/requirements +stestr run --suppress-attachments test_integration diff --git a/tox.ini b/tox.ini index d48c770..7bc530a 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,9 @@ setenv = OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1} OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1} OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60} +# NOTE(stephenfin): pbr intentionally does not use constraints since we support +# a broader range of Python versions than OpenStack as a whole deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt commands = stestr run --suppress-attachments {posargs} @@ -22,10 +23,10 @@ commands = flake8 {posargs} [testenv:docs] whitelist_externals = rm deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/build doc/source/reference/api + python setup.py sdist sphinx-build -W -b html doc/source doc/build/html {posargs} [testenv:releasenotes] -- 2.34.1