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
25156790
Unverified
Commit
25156790
authored
Apr 07, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix permissions of the dist-info files
parent
ade97ab7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
poetry/masonry/builders/wheel.py
+1
-0
tests/masonry/builders/test_wheel.py
+23
-0
No files found.
poetry/masonry/builders/wheel.py
View file @
25156790
...
...
@@ -277,6 +277,7 @@ class WheelBuilder(Builder):
# give you the exact same result.
date_time
=
(
2016
,
1
,
1
,
0
,
0
,
0
)
zi
=
zipfile
.
ZipInfo
(
rel_path
,
date_time
)
zi
.
external_attr
=
(
0
o644
&
0xFFFF
)
<<
16
# Unix attributes
b
=
sio
.
getvalue
()
.
encode
(
"utf-8"
)
hashsum
=
hashlib
.
sha256
(
b
)
hash_digest
=
urlsafe_b64encode
(
hashsum
.
digest
())
.
decode
(
"ascii"
)
.
rstrip
(
"="
)
...
...
tests/masonry/builders/test_wheel.py
View file @
25156790
...
...
@@ -128,3 +128,26 @@ def test_package_with_include(mocker):
assert
"my_module.py"
in
names
assert
"notes.txt"
in
names
assert
"package_with_include/__init__.py"
in
names
def
test_dist_info_file_permissions
():
module_path
=
fixtures_dir
/
"complete"
WheelBuilder
.
make
(
Poetry
.
create
(
str
(
module_path
)),
NullEnv
(),
NullIO
())
whl
=
module_path
/
"dist"
/
"my_package-1.2.3-py3-none-any.whl"
with
zipfile
.
ZipFile
(
str
(
whl
))
as
z
:
assert
(
z
.
getinfo
(
"my_package-1.2.3.dist-info/WHEEL"
)
.
external_attr
==
0
o644
<<
16
)
assert
(
z
.
getinfo
(
"my_package-1.2.3.dist-info/METADATA"
)
.
external_attr
==
0
o644
<<
16
)
assert
(
z
.
getinfo
(
"my_package-1.2.3.dist-info/RECORD"
)
.
external_attr
==
0
o644
<<
16
)
assert
(
z
.
getinfo
(
"my_package-1.2.3.dist-info/entry_points.txt"
)
.
external_attr
==
0
o644
<<
16
)
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