Commit f14a3b2b authored by Stephen Finucane's avatar Stephen Finucane

Support wheel 0.32.0+

Wheel 0.32.0 removed the 'wheel install' command [1] and, subsequently,
the 'wheel.install' module [2]. It also made 'WheelFile' a subclass of
'zipfile.ZipFile' rather than a wrapper [2] and deprecated the '[wheel]'
section of 'setup.cfg' in favour of '[bdist_wheel]'. Handle these
changes.

[1] https://github.com/pypa/wheel/commit/353217fb4
[2] https://github.com/pypa/wheel/commit/89492505b

Change-Id: I2903089a07bdd2dc96437b9f65f2d2bba2741707
parent 97e343c0
......@@ -56,7 +56,7 @@ import testscenarios
import testtools
from testtools import matchers
import virtualenv
import wheel.install
from wheel import wheelfile
from pbr import git
from pbr import packaging
......@@ -372,13 +372,13 @@ class TestPackagingWheels(base.BaseTestCase):
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_file = wheelfile.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()
wheel_file.extractall(self.extracted_wheel_dir)
wheel_file.close()
def test_data_directory_has_wsgi_scripts(self):
# Build the path to the scripts directory
......
......@@ -53,5 +53,5 @@ build-dir = doc/build
source-dir = doc/source
warning-is-error = 1
[wheel]
[bdist_wheel]
universal = 1
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
wheel>=0.32.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
mock>=2.0.0 # BSD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment