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
783fb9a5
Unverified
Commit
783fb9a5
authored
May 26, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically add LICENSE file to built packages
parent
68f3791b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
0 deletions
+39
-0
CHANGELOG.md
+1
-0
docs/docs/faq.md
+3
-0
poetry/masonry/builders/builder.py
+10
-0
tests/masonry/builders/fixtures/complete/LICENSE
+20
-0
tests/masonry/builders/test_sdist.py
+5
-0
No files found.
CHANGELOG.md
View file @
783fb9a5
...
...
@@ -23,6 +23,7 @@
-
Improved support for private repositories.
-
Expanded version constraints now keep the original version's precision.
-
The lock file hash no longer use the project's name and version.
-
The
`LICENSE`
file, or similar, is now automatically added to the built packages.
### Fixed
...
...
docs/docs/faq.md
0 → 100644
View file @
783fb9a5
# Third Party Libraries
Poetry
poetry/masonry/builders/builder.py
View file @
783fb9a5
...
...
@@ -103,6 +103,16 @@ class Builder(object):
)
to_add
.
append
(
Path
(
'pyproject.toml'
))
# If a license file exists, add it
for
license_file
in
self
.
_path
.
glob
(
'LICENSE*'
):
self
.
_io
.
writeln
(
' - Adding: <comment>{}</comment>'
.
format
(
license_file
.
relative_to
(
self
.
_path
)
),
verbosity
=
self
.
_io
.
VERBOSITY_VERY_VERBOSE
)
to_add
.
append
(
license_file
.
relative_to
(
self
.
_path
))
# If a README is specificed we need to include it
# to avoid errors
if
'readme'
in
self
.
_poetry
.
local_config
:
...
...
tests/masonry/builders/fixtures/complete/LICENSE
0 → 100644
View file @
783fb9a5
Copyright (c) 2018 Sébastien Eustace
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
tests/masonry/builders/test_sdist.py
View file @
783fb9a5
...
...
@@ -156,6 +156,7 @@ def test_find_files_to_add():
result
=
builder
.
find_files_to_add
()
assert
result
==
[
Path
(
'LICENSE'
),
Path
(
'README.rst'
),
Path
(
'my_package/__init__.py'
),
Path
(
'my_package/data1/test.json'
),
...
...
@@ -176,6 +177,10 @@ def test_package():
assert
sdist
.
exists
()
tar
=
tarfile
.
open
(
str
(
sdist
),
'r'
)
assert
'my-package-1.2.3/LICENSE'
in
tar
.
getnames
()
def
test_module
():
poetry
=
Poetry
.
create
(
project
(
'module1'
))
...
...
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