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
f8f25282
Unverified
Commit
f8f25282
authored
Jun 18, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python wilcard requirement in metadata
parent
789fcc16
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
4 deletions
+60
-4
CHANGELOG.md
+1
-0
poetry/masonry/metadata.py
+4
-4
tests/masonry/builders/fixtures/module1/pyproject.toml
+4
-0
tests/masonry/builders/test_sdist.py
+51
-0
No files found.
CHANGELOG.md
View file @
f8f25282
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
-
Fixed package finding with multiple custom repositories.
-
Fixed package finding with multiple custom repositories.
-
Fixed handling of root incompatibilities.
-
Fixed handling of root incompatibilities.
-
Fixed an error where packages from custom repositories would not be found.
-
Fixed an error where packages from custom repositories would not be found.
-
Fixed wildcard Python requirement being wrongly set in distributions metadata.
## [0.10.3] - 2018-06-04
## [0.10.3] - 2018-06-04
...
...
poetry/masonry/metadata.py
View file @
f8f25282
...
@@ -62,12 +62,12 @@ class Metadata:
...
@@ -62,12 +62,12 @@ class Metadata:
# Version 1.2
# Version 1.2
meta
.
maintainer
=
meta
.
author
meta
.
maintainer
=
meta
.
author
meta
.
maintainer_email
=
meta
.
author_email
meta
.
maintainer_email
=
meta
.
author_email
meta
.
requires_python
=
package
.
python_constraint
meta
.
requires_dist
=
[
d
.
to_pep_508
()
for
d
in
package
.
requires
]
# Requires python
# Requires python
meta
.
requires_python
=
format_python_constraint
(
package
.
python_constraint
)
if
not
package
.
python_constraint
.
is_any
():
meta
.
requires_python
=
format_python_constraint
(
package
.
python_constraint
)
meta
.
requires_dist
=
[
d
.
to_pep_508
()
for
d
in
package
.
requires
]
# Version 2.1
# Version 2.1
if
package
.
readme
:
if
package
.
readme
:
...
...
tests/masonry/builders/fixtures/module1/pyproject.toml
View file @
f8f25282
...
@@ -10,3 +10,7 @@ license = "MIT"
...
@@ -10,3 +10,7 @@ license = "MIT"
readme
=
"README.rst"
readme
=
"README.rst"
homepage
=
"https://poetry.eustace.io/"
homepage
=
"https://poetry.eustace.io/"
[tool.poetry.dependencies]
python
=
"*"
tests/masonry/builders/test_sdist.py
View file @
f8f25282
...
@@ -4,6 +4,8 @@ import re
...
@@ -4,6 +4,8 @@ import re
import
shutil
import
shutil
import
tarfile
import
tarfile
from
email.parser
import
Parser
from
poetry.io
import
NullIO
from
poetry.io
import
NullIO
from
poetry.masonry.builders.sdist
import
SdistBuilder
from
poetry.masonry.builders.sdist
import
SdistBuilder
from
poetry.masonry.utils.package_include
import
PackageInclude
from
poetry.masonry.utils.package_include
import
PackageInclude
...
@@ -125,6 +127,55 @@ def test_make_setup():
...
@@ -125,6 +127,55 @@ def test_make_setup():
assert
ns
[
"extras_require"
]
==
{
"time"
:
[
"pendulum>=1.4,<2.0"
]}
assert
ns
[
"extras_require"
]
==
{
"time"
:
[
"pendulum>=1.4,<2.0"
]}
def
test_make_pkg_info
():
poetry
=
Poetry
.
create
(
project
(
"complete"
))
builder
=
SdistBuilder
(
poetry
,
NullVenv
(),
NullIO
())
pkg_info
=
builder
.
build_pkg_info
()
p
=
Parser
()
parsed
=
p
.
parsestr
(
pkg_info
.
decode
())
assert
parsed
[
"Metadata-Version"
]
==
"2.1"
assert
parsed
[
"Name"
]
==
"my-package"
assert
parsed
[
"Version"
]
==
"1.2.3"
assert
parsed
[
"Summary"
]
==
"Some description."
assert
parsed
[
"Author"
]
==
"Sébastien Eustace"
assert
parsed
[
"Author-email"
]
==
"sebastien@eustace.io"
assert
parsed
[
"Keywords"
]
==
"packaging,dependency,poetry"
assert
parsed
[
"Requires-Python"
]
==
">=3.6,<4.0"
classifiers
=
parsed
.
get_all
(
"Classifier"
)
assert
classifiers
==
[
"License :: OSI Approved :: MIT License"
,
"Programming Language :: Python :: 3"
,
"Programming Language :: Python :: 3.6"
,
"Programming Language :: Python :: 3.7"
,
"Topic :: Software Development :: Build Tools"
,
"Topic :: Software Development :: Libraries :: Python Modules"
,
]
extras
=
parsed
.
get_all
(
"Provides-Extra"
)
assert
extras
==
[
"time"
]
requires
=
parsed
.
get_all
(
"Requires-Dist"
)
assert
requires
==
[
"cachy[msgpack] (>=0.2.0,<0.3.0)"
,
"cleo (>=0.6,<0.7)"
,
'pendulum (>=1.4,<2.0); extra == "time"'
,
]
def
test_make_pkg_info_any_python
():
poetry
=
Poetry
.
create
(
project
(
"module1"
))
builder
=
SdistBuilder
(
poetry
,
NullVenv
(),
NullIO
())
pkg_info
=
builder
.
build_pkg_info
()
p
=
Parser
()
parsed
=
p
.
parsestr
(
pkg_info
.
decode
())
assert
"Requires-Python"
not
in
parsed
def
test_find_files_to_add
():
def
test_find_files_to_add
():
poetry
=
Poetry
.
create
(
project
(
"complete"
))
poetry
=
Poetry
.
create
(
project
(
"complete"
))
...
...
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