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
553e21e1
Commit
553e21e1
authored
Nov 21, 2017
by
Henk-Jaap Wagenaar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setup.cfg support for long_description_content_type (in line with docs).
parent
d45be2cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
setuptools/command/egg_info.py
setuptools/command/egg_info.py
+1
-1
setuptools/dist.py
setuptools/dist.py
+7
-0
setuptools/tests/test_config.py
setuptools/tests/test_config.py
+2
-0
No files found.
setuptools/command/egg_info.py
View file @
553e21e1
...
...
@@ -598,7 +598,7 @@ def write_pkg_info(cmd, basename, filename):
metadata
.
version
,
oldver
=
cmd
.
egg_version
,
metadata
.
version
metadata
.
name
,
oldname
=
cmd
.
egg_name
,
metadata
.
name
metadata
.
long_description_content_type
=
getattr
(
cmd
.
distribution
,
cmd
.
distribution
.
metadata
,
'long_description_content_type'
)
try
:
...
...
setuptools/dist.py
View file @
553e21e1
...
...
@@ -332,6 +332,13 @@ class Distribution(Distribution_parse_config_files, _Distribution):
for ep in pkg_resources.iter_entry_points('
distutils
.
setup_keywords
'):
vars(self).setdefault(ep.name, None)
_Distribution.__init__(self, attrs)
try:
self.metadata.long_description_content_type
except AttributeError:
self.metadata.long_description_content_type =
\
self.long_description_content_type
if isinstance(self.metadata.version, numbers.Number):
# Some people apparently take "version number" too literally :)
self.metadata.version = str(self.metadata.version)
...
...
setuptools/tests/test_config.py
View file @
553e21e1
...
...
@@ -110,6 +110,7 @@ class TestMetadata:
'[metadata]
\
n
'
'version = 10.1.1
\
n
'
'description = Some description
\
n
'
'long_description_content_type = text/something
\
n
'
'long_description = file: README
\
n
'
'name = fake_name
\
n
'
'keywords = one, two
\
n
'
...
...
@@ -131,6 +132,7 @@ class TestMetadata:
assert
metadata
.
version
==
'10.1.1'
assert
metadata
.
description
==
'Some description'
assert
metadata
.
long_description_content_type
==
'text/something'
assert
metadata
.
long_description
==
'readme contents
\
n
line2'
assert
metadata
.
provides
==
[
'package'
,
'package.sub'
]
assert
metadata
.
license
==
'BSD 3-Clause License'
...
...
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