Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
f4803e91
You need to sign in or sign up before continuing.
Unverified
Commit
f4803e91
authored
Aug 19, 2019
by
Bryce Drennan
Committed by
GitHub
Aug 19, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1309 from sdispater/950-simplified
950 simplified
parents
ab81ff02
e69077e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
poetry/masonry/builders/wheel.py
+2
-2
tests/masonry/builders/fixtures/localversionlabel/localversionlabel.py
+1
-0
tests/masonry/builders/fixtures/localversionlabel/pyproject.toml
+5
-0
tests/masonry/builders/test_wheel.py
+12
-0
No files found.
poetry/masonry/builders/wheel.py
View file @
f4803e91
...
@@ -203,7 +203,7 @@ class WheelBuilder(Builder):
...
@@ -203,7 +203,7 @@ class WheelBuilder(Builder):
def
wheel_filename
(
self
):
# type: () -> str
def
wheel_filename
(
self
):
# type: () -> str
return
"{}-{}-{}.whl"
.
format
(
return
"{}-{}-{}.whl"
.
format
(
re
.
sub
(
r"[^\w\d.]+"
,
"_"
,
self
.
_package
.
pretty_name
,
flags
=
re
.
UNICODE
),
re
.
sub
(
r"[^\w\d.]+"
,
"_"
,
self
.
_package
.
pretty_name
,
flags
=
re
.
UNICODE
),
re
.
sub
(
r"[^\w\d.]+"
,
"_"
,
self
.
_meta
.
version
,
flags
=
re
.
UNICODE
),
re
.
sub
(
r"[^\w\d.
\+
]+"
,
"_"
,
self
.
_meta
.
version
,
flags
=
re
.
UNICODE
),
self
.
tag
,
self
.
tag
,
)
)
...
@@ -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
)
...
...
tests/masonry/builders/fixtures/localversionlabel/localversionlabel.py
0 → 100644
View file @
f4803e91
"""Test fixture for https://github.com/sdispater/poetry/issues/756"""
tests/masonry/builders/fixtures/localversionlabel/pyproject.toml
0 → 100644
View file @
f4803e91
[tool.poetry]
name
=
"localversionlabel"
version
=
"0.1-beta.1+gitbranch-buildno-1"
authors
=
[]
tests/masonry/builders/test_wheel.py
View file @
f4803e91
...
@@ -61,6 +61,18 @@ def test_wheel_prerelease():
...
@@ -61,6 +61,18 @@ def test_wheel_prerelease():
assert
whl
.
exists
()
assert
whl
.
exists
()
def
test_wheel_localversionlabel
():
module_path
=
fixtures_dir
/
"localversionlabel"
WheelBuilder
.
make
(
Poetry
.
create
(
str
(
module_path
)),
NullEnv
(),
NullIO
())
local_version_string
=
"localversionlabel-0.1b1+gitbranch.buildno.1"
whl
=
module_path
/
"dist"
/
(
local_version_string
+
"-py2.py3-none-any.whl"
)
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"
WheelBuilder
.
make
(
Poetry
.
create
(
str
(
module_path
)),
NullEnv
(),
NullIO
())
WheelBuilder
.
make
(
Poetry
.
create
(
str
(
module_path
)),
NullEnv
(),
NullIO
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment