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
986ff42f
Commit
986ff42f
authored
Aug 09, 2017
by
Sviatoslav Sydorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow adding few files @ metadata.long_description
parent
60cfeeac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
setuptools/config.py
setuptools/config.py
+3
-3
setuptools/tests/test_config.py
setuptools/tests/test_config.py
+24
-0
No files found.
setuptools/config.py
View file @
986ff42f
...
...
@@ -245,8 +245,8 @@ class ConfigHandler(object):
directory with setup.py.
Examples:
includ
e: LICENSE
includ
e: src/file.txt
fil
e: LICENSE
fil
e: src/file.txt
:param str value:
:rtype: str
...
...
@@ -408,7 +408,7 @@ class ConfigMetadataHandler(ConfigHandler):
'classifiers'
:
self
.
_get_parser_compound
(
parse_file
,
parse_list
),
'license'
:
parse_file
,
'description'
:
parse_file
,
'long_description'
:
parse_file
,
'long_description'
:
self
.
_get_parser_compound
(
parse_list
,
lambda
l
:
'
\
n
'
.
join
(
map
(
parse_file
,
l
)))
,
'version'
:
self
.
_parse_version
,
}
...
...
setuptools/tests/test_config.py
View file @
986ff42f
...
...
@@ -139,6 +139,30 @@ class TestMetadata:
assert
metadata
.
download_url
==
'http://test.test.com/test/'
assert
metadata
.
maintainer_email
==
'test@test.com'
def
test_file_mixed
(
self
,
tmpdir
):
fake_env
(
tmpdir
,
'[metadata]
\
n
'
'long_description =
\
n
'
' Some normal line
\
n
'
' file: README.rst
\
n
'
' Another line
\
n
'
' file: CHANGES.rst
\
n
'
'
\
n
'
)
tmpdir
.
join
(
'README.rst'
).
write
(
'readme contents
\
n
line2'
)
tmpdir
.
join
(
'CHANGES.rst'
).
write
(
'changelog contents
\
n
and stuff'
)
with
get_dist
(
tmpdir
)
as
dist
:
assert
dist
.
metadata
.
long_description
==
(
'Some normal line
\
n
'
'readme contents
\
n
line2
\
n
'
'Another line
\
n
'
'changelog contents
\
n
and stuff'
)
def
test_file_sandboxed
(
self
,
tmpdir
):
fake_env
(
...
...
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