Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
f52b3b1c
Commit
f52b3b1c
authored
Nov 12, 2018
by
Paul Ganssle
Committed by
GitHub
Nov 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1590 from pganssle/fix_author
Fix issue with missing author metadata
parents
95df56d0
ac3cee39
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
changelog.d/1590.change.rst
changelog.d/1590.change.rst
+1
-0
setuptools/dist.py
setuptools/dist.py
+2
-2
setuptools/tests/test_dist.py
setuptools/tests/test_dist.py
+16
-0
No files found.
changelog.d/1590.change.rst
0 → 100644
View file @
f52b3b1c
Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata.
setuptools/dist.py
View file @
f52b3b1c
...
@@ -138,8 +138,8 @@ def write_pkg_file(self, file):
...
@@ -138,8 +138,8 @@ def write_pkg_file(self, file):
write_field
(
'Home-page'
,
self
.
get_url
())
write_field
(
'Home-page'
,
self
.
get_url
())
if
version
<
StrictVersion
(
'1.2'
):
if
version
<
StrictVersion
(
'1.2'
):
write_field
(
'Author
:
'
,
self
.
get_contact
())
write_field
(
'Author'
,
self
.
get_contact
())
write_field
(
'Author-email
:
'
,
self
.
get_contact_email
())
write_field
(
'Author-email'
,
self
.
get_contact_email
())
else
:
else
:
optional_fields
=
(
optional_fields
=
(
(
'Author'
,
'author'
),
(
'Author'
,
'author'
),
...
...
setuptools/tests/test_dist.py
View file @
f52b3b1c
...
@@ -115,6 +115,20 @@ def __read_test_cases():
...
@@ -115,6 +115,20 @@ def __read_test_cases():
merge_dicts
(
base_attrs
,
{
merge_dicts
(
base_attrs
,
{
'provides_extras'
:
[
'foo'
,
'bar'
]
'provides_extras'
:
[
'foo'
,
'bar'
]
}),
marks
=
pytest
.
mark
.
xfail
(
reason
=
"provides_extras not read"
)),
}),
marks
=
pytest
.
mark
.
xfail
(
reason
=
"provides_extras not read"
)),
(
'Missing author, missing author e-mail'
,
{
'name'
:
'foo'
,
'version'
:
'1.0.0'
}),
(
'Missing author'
,
{
'name'
:
'foo'
,
'version'
:
'1.0.0'
,
'author_email'
:
'snorri@sturluson.name'
}),
(
'Missing author e-mail'
,
{
'name'
:
'foo'
,
'version'
:
'1.0.0'
,
'author'
:
'Snorri Sturluson'
}),
(
'Missing author'
,
{
'name'
:
'foo'
,
'version'
:
'1.0.0'
,
'author'
:
'Snorri Sturluson'
}),
]
]
return
test_cases
return
test_cases
...
@@ -141,6 +155,8 @@ def test_read_metadata(name, attrs):
...
@@ -141,6 +155,8 @@ def test_read_metadata(name, attrs):
tested_attrs
=
[
tested_attrs
=
[
(
'name'
,
dist_class
.
get_name
),
(
'name'
,
dist_class
.
get_name
),
(
'version'
,
dist_class
.
get_version
),
(
'version'
,
dist_class
.
get_version
),
(
'author'
,
dist_class
.
get_contact
),
(
'author_email'
,
dist_class
.
get_contact_email
),
(
'metadata_version'
,
dist_class
.
get_metadata_version
),
(
'metadata_version'
,
dist_class
.
get_metadata_version
),
(
'provides'
,
dist_class
.
get_provides
),
(
'provides'
,
dist_class
.
get_provides
),
(
'description'
,
dist_class
.
get_description
),
(
'description'
,
dist_class
.
get_description
),
...
...
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