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
c2332f2d
Unverified
Commit
c2332f2d
authored
Mar 17, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wheel entry points being written on a single line
parent
cde1d16d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
4 deletions
+40
-4
CHANGELOG.md
+7
-0
poetry/masonry/builders/wheel.py
+1
-3
tests/masonry/builders/fixtures/complete/pyproject.toml
+1
-0
tests/masonry/builders/test_complete.py
+27
-0
tests/masonry/builders/test_sdist.py
+4
-1
No files found.
CHANGELOG.md
View file @
c2332f2d
# Change Log
## [Unreleased]
### Fixed
-
Fixed wheel entry points being written on a single line.
## [0.6.0] - 2018-03-16
### Added
...
...
poetry/masonry/builders/wheel.py
View file @
c2332f2d
...
...
@@ -16,9 +16,7 @@ from poetry.__version__ import __version__
from
poetry.semver.constraints
import
Constraint
from
poetry.semver.constraints
import
MultiConstraint
from
poetry.vcs
import
get_vcs
from
poetry.version.helpers
import
format_python_constraint
from
..metadata
import
Metadata
from
..utils.helpers
import
normalize_file_permissions
from
..utils.tags
import
get_abbr_impl
from
..utils.tags
import
get_abi_tag
...
...
@@ -279,7 +277,7 @@ class WheelBuilder(Builder):
for
group_name
in
sorted
(
entry_points
):
fp
.
write
(
'[{}]
\n
'
.
format
(
group_name
))
for
ep
in
sorted
(
entry_points
[
group_name
]):
fp
.
write
(
ep
.
replace
(
' '
,
''
))
fp
.
write
(
ep
.
replace
(
' '
,
''
)
+
'
\n
'
)
fp
.
write
(
'
\n
'
)
...
...
tests/masonry/builders/fixtures/complete/pyproject.toml
View file @
c2332f2d
...
...
@@ -27,3 +27,4 @@ pytest = "~3.4"
[tool.poetry.scripts]
my-script
=
"my_package:main"
my-2nd-script
=
"my_package:main2"
tests/masonry/builders/test_complete.py
View file @
c2332f2d
...
...
@@ -53,4 +53,31 @@ def test_wheel_c_extension():
if
name
.
startswith
(
'extended/extended'
)
and
name
.
endswith
(
'.so'
):
has_compiled_extension
=
True
zip
.
close
()
assert
has_compiled_extension
def
test_complete
():
module_path
=
fixtures_dir
/
'complete'
builder
=
CompleteBuilder
(
Poetry
.
create
(
module_path
),
NullVenv
(
True
),
NullIO
())
builder
.
build
()
whl
=
module_path
/
'dist'
/
'my_package-1.2.3-py3-none-any.whl'
assert
whl
.
exists
zip
=
zipfile
.
ZipFile
(
whl
)
try
:
entry_points
=
zip
.
read
(
'my_package-1.2.3.dist-info/entry_points.txt'
)
print
(
entry_points
.
decode
())
assert
entry_points
.
decode
()
==
"""[console_scripts]
my-2nd-script=my_package:main2
my-script=my_package:main
"""
finally
:
zip
.
close
()
tests/masonry/builders/test_sdist.py
View file @
c2332f2d
...
...
@@ -88,7 +88,10 @@ def test_make_setup():
'cleo (>=0.6.0.0,<0.7.0.0)'
]
assert
ns
[
'entry_points'
]
==
{
'console_scripts'
:
[
'my-script = my_package:main'
]
'console_scripts'
:
[
'my-script = my_package:main'
,
'my-2nd-script = my_package:main2'
,
]
}
...
...
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