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
e846e067
Commit
e846e067
authored
Dec 01, 2016
by
Jason R. Coombs
Committed by
GitHub
Dec 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #843 from tweksteen/pypi_tests
Remove _add_defaults_data_files override and add unittest
parents
09f0ed40
11b921f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
setuptools/command/sdist.py
setuptools/command/sdist.py
+4
-3
setuptools/tests/test_sdist.py
setuptools/tests/test_sdist.py
+7
-2
No files found.
setuptools/command/sdist.py
View file @
e846e067
...
...
@@ -142,9 +142,10 @@ class sdist(sdist_add_defaults, orig.sdist):
for
filename
in
filenames
])
def
_add_defaults_data_files
(
self
):
"""
Don't add any data files, but why?
"""
try
:
sdist_add_defaults
.
_add_defaults_data_files
(
self
)
except
TypeError
:
log
.
warn
(
"data_files contains unexpected objects"
)
def
check_readme
(
self
):
for
f
in
self
.
READMES
:
...
...
setuptools/tests/test_sdist.py
View file @
e846e067
...
...
@@ -26,7 +26,8 @@ SETUP_ATTRS = {
'name'
:
'sdist_test'
,
'version'
:
'0.0'
,
'packages'
:
[
'sdist_test'
],
'package_data'
:
{
'sdist_test'
:
[
'*.txt'
]}
'package_data'
:
{
'sdist_test'
:
[
'*.txt'
]},
'data_files'
:
[(
"data"
,
[
os
.
path
.
join
(
"d"
,
"e.dat"
)])],
}
SETUP_PY
=
"""
\
...
...
@@ -95,9 +96,12 @@ class TestSdistTest:
# Set up the rest of the test package
test_pkg
=
os
.
path
.
join
(
self
.
temp_dir
,
'sdist_test'
)
os
.
mkdir
(
test_pkg
)
data_folder
=
os
.
path
.
join
(
self
.
temp_dir
,
"d"
)
os
.
mkdir
(
data_folder
)
# *.rst was not included in package_data, so c.rst should not be
# automatically added to the manifest when not under version control
for
fname
in
[
'__init__.py'
,
'a.txt'
,
'b.txt'
,
'c.rst'
]:
for
fname
in
[
'__init__.py'
,
'a.txt'
,
'b.txt'
,
'c.rst'
,
os
.
path
.
join
(
data_folder
,
"e.dat"
)]:
# Just touch the files; their contents are irrelevant
open
(
os
.
path
.
join
(
test_pkg
,
fname
),
'w'
).
close
()
...
...
@@ -126,6 +130,7 @@ class TestSdistTest:
assert
os
.
path
.
join
(
'sdist_test'
,
'a.txt'
)
in
manifest
assert
os
.
path
.
join
(
'sdist_test'
,
'b.txt'
)
in
manifest
assert
os
.
path
.
join
(
'sdist_test'
,
'c.rst'
)
not
in
manifest
assert
os
.
path
.
join
(
'd'
,
'e.dat'
)
in
manifest
def
test_defaults_case_sensitivity
(
self
):
"""
...
...
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