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
417d01d2
Unverified
Commit
417d01d2
authored
Nov 16, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an error when building distributions with exclude
parent
140d16a5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletions
+22
-1
CHANGELOG.md
+1
-0
poetry/masonry/builders/builder.py
+1
-1
tests/masonry/builders/test_builder.py
+18
-0
tests/masonry/builders/test_complete.py
+2
-0
No files found.
CHANGELOG.md
View file @
417d01d2
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
### Fixed
### Fixed
-
Fixed executables from outside the virtualenv not being accessible.
-
Fixed executables from outside the virtualenv not being accessible.
-
Fixed a possible error when building distributions with the
`exclude`
option.
## [0.12.8] - 2018-11-13
## [0.12.8] - 2018-11-13
...
...
poetry/masonry/builders/builder.py
View file @
417d01d2
...
@@ -53,7 +53,7 @@ class Builder(object):
...
@@ -53,7 +53,7 @@ class Builder(object):
explicitely_excluded
=
set
()
explicitely_excluded
=
set
()
for
excluded_glob
in
self
.
_package
.
exclude
:
for
excluded_glob
in
self
.
_package
.
exclude
:
for
excluded
in
self
.
_path
.
glob
(
excluded_glob
):
for
excluded
in
self
.
_path
.
glob
(
str
(
excluded_glob
)
):
explicitely_excluded
.
add
(
excluded
.
relative_to
(
self
.
_path
)
.
as_posix
())
explicitely_excluded
.
add
(
excluded
.
relative_to
(
self
.
_path
)
.
as_posix
())
ignored
=
vcs_ignored_files
|
explicitely_excluded
ignored
=
vcs_ignored_files
|
explicitely_excluded
...
...
tests/masonry/builders/test_builder.py
0 → 100644
View file @
417d01d2
from
poetry.io
import
NullIO
from
poetry.masonry.builders.builder
import
Builder
from
poetry.poetry
import
Poetry
from
poetry.utils._compat
import
Path
from
poetry.utils.env
import
NullEnv
def
test_builder_find_excluded_files
(
mocker
):
p
=
mocker
.
patch
(
"poetry.vcs.git.Git.get_ignored_files"
)
p
.
return_value
=
[]
builder
=
Builder
(
Poetry
.
create
(
Path
(
__file__
)
.
parent
/
"fixtures"
/
"complete"
),
NullEnv
(),
NullIO
(),
)
assert
builder
.
find_excluded_files
()
==
{
"my_package/sub_pkg1/extra_file.xml"
}
tests/masonry/builders/test_complete.py
View file @
417d01d2
...
@@ -163,6 +163,8 @@ def test_complete():
...
@@ -163,6 +163,8 @@ def test_complete():
zip
=
zipfile
.
ZipFile
(
str
(
whl
))
zip
=
zipfile
.
ZipFile
(
str
(
whl
))
try
:
try
:
assert
"my_package/sub_pgk1/extra_file.xml"
not
in
zip
.
namelist
()
entry_points
=
zip
.
read
(
"my_package-1.2.3.dist-info/entry_points.txt"
)
entry_points
=
zip
.
read
(
"my_package-1.2.3.dist-info/entry_points.txt"
)
assert
(
assert
(
...
...
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