Accepting request 642405 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/642405
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pbr?expand=0&rev=40
This commit is contained in:
Dominique Leuenberger 2018-10-18 13:30:40 +00:00 committed by Git OBS Bridge
commit 22076f5adc
5 changed files with 94 additions and 6 deletions

59
new_wheel.patch Normal file
View File

@ -0,0 +1,59 @@
--- a/pbr/tests/test_packaging.py
+++ b/pbr/tests/test_packaging.py
@@ -41,6 +41,7 @@
import email
import email.errors
import imp
+import logging
import os
import re
import sys
@@ -56,8 +57,11 @@ import testscenarios
import testtools
from testtools import matchers
import virtualenv
-import wheel.install
+try:
+ from wheel.install import WheelFile
+except ImportError:
+ from wheel.wheelfile import WheelFile
from pbr import git
from pbr import packaging
from pbr.tests import base
@@ -372,13 +376,15 @@ class TestPackagingWheels(base.BaseTestC
relative_wheel_filename = os.listdir(dist_dir)[0]
absolute_wheel_filename = os.path.join(
dist_dir, relative_wheel_filename)
- wheel_file = wheel.install.WheelFile(absolute_wheel_filename)
- wheel_name = wheel_file.parsed_filename.group('namever')
- # Create a directory path to unpack the wheel to
- self.extracted_wheel_dir = os.path.join(dist_dir, wheel_name)
- # Extract the wheel contents to the directory we just created
- wheel_file.zipfile.extractall(self.extracted_wheel_dir)
- wheel_file.zipfile.close()
+ with WheelFile(absolute_wheel_filename) as wheel_file:
+ wheel_name = wheel_file.parsed_filename.group('namever')
+ # Create a directory path to unpack the wheel to
+ self.extracted_wheel_dir = os.path.join(dist_dir, wheel_name)
+ # Extract the wheel contents to the directory we just created
+ if hasattr(wheel_file, 'zipfile'):
+ wheel_file.zipfile.extractall(self.extracted_wheel_dir)
+ else:
+ wheel_file.extractall(self.extracted_wheel_dir)
def test_data_directory_has_wsgi_scripts(self):
# Build the path to the scripts directory
@@ -402,8 +409,10 @@ class TestPackagingWheels(base.BaseTestC
static_object_path = os.path.join(
built_package_dir, static_object_filename)
- self.assertTrue(os.path.exists(built_package_dir))
- self.assertTrue(os.path.exists(static_object_path))
+ self.assertTrue(os.path.exists(built_package_dir),
+ 'built_package_dir %s not found!' % built_package_dir)
+ self.assertTrue(os.path.exists(static_object_path),
+ 'static_object_path %s not found!' % static_object_path)
class TestPackagingHelpers(testtools.TestCase):

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b8be50d938c9bb75d0eaf7eda111eec1bf6dc88a62a6412e33bf077457e0f45
size 107958

3
pbr-4.3.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1be135151a0da949af8c5d0ee9013d9eafada71237eb80b3ba8896b4f12ec5dc
size 112935

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Mon Oct 15 13:23:36 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Update to 4.3.0:
* Remove my\_ip from generated wsgi script
* Fix typo in contribution instructions
* Add release note for fix to bug 1786306
* Move pbr-installation jobs in-tree
* Support subdirectory in the url
* remove pypy jobs
* add lib-forward-testing-python3 test job
* add python 3.6 unit test job
* switch documentation job to new PTI
* import zuul job settings from project-config
* Ignore Zuul when generating AUTHORS
* tox: Re-add cover target
- Add new_wheel.patch to make compatible with wheel = 0.32.1
-------------------------------------------------------------------
Sun Oct 7 08:43:14 CEST 2018 - mcepl@suse.com
- Revert previous commit.
-------------------------------------------------------------------
Sun Oct 7 06:34:26 UTC 2018 - Matěj Cepl <mcepl@suse.com>
- Partially switch off tests requiring testscenarios and stestr.
-------------------------------------------------------------------
Fri Sep 14 21:18:14 UTC 2018 - dmueller@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -28,7 +28,7 @@ Name: python-pbr
%else
Name: python-pbr-%{flavor}
%endif
Version: 4.2.0
Version: 4.3.0
Release: 0
Summary: Python Build Reasonableness
License: Apache-2.0
@ -36,6 +36,7 @@ Group: Development/Languages/Python
URL: http://pypi.python.org/pypi/pbr
Source: https://files.pythonhosted.org/packages/source/p/pbr/pbr-%{version}.tar.gz
Patch0: 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
Patch1: new_wheel.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -70,7 +71,7 @@ information.
%prep
%setup -q -n pbr-%{version}
%patch0 -p1
%autopatch -p1
# Get rid of ugly build-time deps that require network:
sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py