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
3cf8b314
Unverified
Commit
3cf8b314
authored
Nov 21, 2019
by
finswimmer
Committed by
GitHub
Nov 21, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1541 from aloisklink/add-mtime-to-sdist
Set mtime on setup.py/PKG-INFO when building sdist
parents
8131859a
7a0698d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
poetry/masonry/builders/sdist.py
+3
-0
tests/masonry/builders/test_sdist.py
+3
-0
No files found.
poetry/masonry/builders/sdist.py
View file @
3cf8b314
...
...
@@ -2,6 +2,7 @@
import
os
import
re
import
tarfile
import
time
from
collections
import
defaultdict
from
copy
import
copy
...
...
@@ -83,12 +84,14 @@ class SdistBuilder(Builder):
setup
=
self
.
build_setup
()
tar_info
=
tarfile
.
TarInfo
(
pjoin
(
tar_dir
,
"setup.py"
))
tar_info
.
size
=
len
(
setup
)
tar_info
.
mtime
=
time
.
time
()
tar
.
addfile
(
tar_info
,
BytesIO
(
setup
))
pkg_info
=
self
.
build_pkg_info
()
tar_info
=
tarfile
.
TarInfo
(
pjoin
(
tar_dir
,
"PKG-INFO"
))
tar_info
.
size
=
len
(
pkg_info
)
tar_info
.
mtime
=
time
.
time
()
tar
.
addfile
(
tar_info
,
BytesIO
(
pkg_info
))
finally
:
tar
.
close
()
...
...
tests/masonry/builders/test_sdist.py
View file @
3cf8b314
...
...
@@ -408,6 +408,9 @@ def test_default_with_excluded_data(mocker):
assert
"my-package-1.2.3/pyproject.toml"
in
names
assert
"my-package-1.2.3/setup.py"
in
names
assert
"my-package-1.2.3/PKG-INFO"
in
names
# all last modified times should be set to a valid timestamp
for
tarinfo
in
tar
.
getmembers
():
assert
0
<
tarinfo
.
mtime
def
test_src_excluded_nested_data
():
...
...
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