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
c32ef788
Unverified
Commit
c32ef788
authored
Apr 11, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve sonnet script
parent
e57e4ac8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
sonnet
+34
-0
No files found.
sonnet
View file @
c32ef788
...
@@ -68,6 +68,7 @@ class MakeReleaseCommand(Command):
...
@@ -68,6 +68,7 @@ class MakeReleaseCommand(Command):
else
:
else
:
vcs_excluded
=
[]
vcs_excluded
=
[]
created_files
=
[]
with
temporary_directory
()
as
tmp_dir
:
with
temporary_directory
()
as
tmp_dir
:
#
Copy
poetry
to
tmp
dir
#
Copy
poetry
to
tmp
dir
poetry_dir
=
os
.
path
.
join
(
tmp_dir
,
"poetry"
)
poetry_dir
=
os
.
path
.
join
(
tmp_dir
,
"poetry"
)
...
@@ -78,6 +79,13 @@ class MakeReleaseCommand(Command):
...
@@ -78,6 +79,13 @@ class MakeReleaseCommand(Command):
set
([
os
.
path
.
join
(
dir_
,
name
)
for
name
in
names
])
set
([
os
.
path
.
join
(
dir_
,
name
)
for
name
in
names
])
),
),
)
)
created_files
+=
[
p
.
relative_to
(
Path
(
tmp_dir
))
for
p
in
Path
(
poetry_dir
).
glob
(
"**/*"
)
if
p
.
is_file
()
and
p
.
suffix
!= ".pyc"
and
str
(
p
.
relative_to
(
Path
(
tmp_dir
)))
not
in
vcs_excluded
]
for
version
,
python
in
sorted
(
pythons
.
items
()):
for
version
,
python
in
sorted
(
pythons
.
items
()):
self
.
line
(
self
.
line
(
"<info>Preparing files for Python <comment>{}</comment></info>"
.
format
(
"<info>Preparing files for Python <comment>{}</comment></info>"
.
format
(
...
@@ -93,6 +101,16 @@ class MakeReleaseCommand(Command):
...
@@ -93,6 +101,16 @@ class MakeReleaseCommand(Command):
self
.
vendorize_for_python
(
self
.
vendorize_for_python
(
python
,
[
op
.
package
for
op
in
ops
],
poetry_dir
,
version
python
,
[
op
.
package
for
op
in
ops
],
poetry_dir
,
version
)
)
vendor_dir
=
Path
(
os
.
path
.
join
(
poetry_dir
,
"_vendor"
,
"py{}"
.
format
(
python
))
)
created_files
+=
[
p
.
relative_to
(
Path
(
tmp_dir
))
for
p
in
vendor_dir
.
glob
(
"**/*"
)
if
p
.
is_file
()
and
p
.
suffix
!= ".pyc"
and
str
(
p
.
relative_to
(
Path
(
tmp_dir
)))
not
in
vcs_excluded
]
self
.
line
(
""
)
self
.
line
(
""
)
...
@@ -132,6 +150,22 @@ class MakeReleaseCommand(Command):
...
@@ -132,6 +150,22 @@ class MakeReleaseCommand(Command):
finally
:
finally
:
gz
.
close
()
gz
.
close
()
self
.
line
(
"<info>Checking release file</info>"
)
missing_files
=
[]
with
tarfile
.
open
(
os
.
path
.
join
(
tmp_dir2
,
name
),
"r"
)
as
tar
:
names
=
tar
.
getnames
()
for
created_file
in
created_files
:
if
created_file
.
as_posix
()
not
in
names
:
missing_files
.
append
(
created_file
.
as_posix
())
if
missing_files
:
self
.
line
(
"<error>Some files are missing:</error>"
)
for
missing_file
in
missing_files
:
self
.
line
(
"<error> - {}</error>"
.
format
(
missing_file
))
return
1
releases_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"releases"
)
releases_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"releases"
)
if
not
os
.
path
.
exists
(
releases_dir
):
if
not
os
.
path
.
exists
(
releases_dir
):
os
.
mkdir
(
releases_dir
)
os
.
mkdir
(
releases_dir
)
...
...
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