Commit a34aa28e by Kristoffer Bakkejord

Don't replace '+' in dist-info/METADATA

Building upon patch from [#1299][1]

[1]: https://github.com/sdispater/poetry/pull/1299/commits

Co-authored-by: David Hotham <david.hotham@metaswitch.com>
parent 73ea7d14
...@@ -214,7 +214,7 @@ class WheelBuilder(Builder): ...@@ -214,7 +214,7 @@ class WheelBuilder(Builder):
def dist_info_name(self, distribution, version): # type: (...) -> str def dist_info_name(self, distribution, version): # type: (...) -> str
escaped_name = re.sub(r"[^\w\d.]+", "_", distribution, flags=re.UNICODE) escaped_name = re.sub(r"[^\w\d.]+", "_", distribution, flags=re.UNICODE)
escaped_version = re.sub(r"[^\w\d.]+", "_", version, flags=re.UNICODE) escaped_version = re.sub(r"[^\w\d.+]+", "_", version, flags=re.UNICODE)
return "{}-{}.dist-info".format(escaped_name, escaped_version) return "{}-{}.dist-info".format(escaped_name, escaped_version)
......
...@@ -64,15 +64,14 @@ def test_wheel_prerelease(): ...@@ -64,15 +64,14 @@ def test_wheel_prerelease():
def test_wheel_localversionlabel(): def test_wheel_localversionlabel():
module_path = fixtures_dir / "localversionlabel" module_path = fixtures_dir / "localversionlabel"
WheelBuilder.make(Poetry.create(str(module_path)), NullEnv(), NullIO()) WheelBuilder.make(Poetry.create(str(module_path)), NullEnv(), NullIO())
local_version_string = "localversionlabel-0.1b1+gitbranch.buildno.1"
whl = ( whl = module_path / "dist" / (local_version_string + "-py2.py3-none-any.whl")
module_path
/ "dist"
/ "localversionlabel-0.1b1+gitbranch.buildno.1-py2.py3-none-any.whl"
)
assert whl.exists() assert whl.exists()
with zipfile.ZipFile(str(whl)) as z:
assert local_version_string + ".dist-info/METADATA" in z.namelist()
def test_wheel_package_src(): def test_wheel_package_src():
module_path = fixtures_dir / "source_package" module_path = fixtures_dir / "source_package"
......
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