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
ed5f934e
Commit
ed5f934e
authored
Nov 07, 2016
by
Charles Bouchard-Légaré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also suppress warning for a single file missing
parent
a64fcd48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
setuptools/command/egg_info.py
setuptools/command/egg_info.py
+9
-2
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+10
-1
No files found.
setuptools/command/egg_info.py
View file @
ed5f934e
...
...
@@ -554,10 +554,17 @@ class manifest_maker(sdist):
msg = "
writing
manifest
file
'%s'" % self.manifest
self.execute(write_file, (self.manifest, files), msg)
def warn(self, msg):
# suppress missing-file warnings from sdist
if not
msg.startswith("
standard
file
not
found
:
"
):
def warn(self, msg):
if not
self._should_suppress_warning(msg
):
sdist.warn(self, msg)
@staticmethod
def _should_suppress_warning(msg):
"""
suppress missing-file warnings from sdist
"""
return re.match(r"
standard
file
.
*
not
found
", msg)
def add_defaults(self):
sdist.add_defaults(self)
self.filelist.append(self.template)
...
...
setuptools/tests/test_egg_info.py
View file @
ed5f934e
...
...
@@ -4,7 +4,7 @@ import re
import
stat
import
sys
from
setuptools.command.egg_info
import
egg_info
from
setuptools.command.egg_info
import
egg_info
,
manifest_maker
from
setuptools.dist
import
Distribution
from
setuptools.extern.six.moves
import
map
...
...
@@ -237,6 +237,15 @@ class TestEggInfo(object):
pkginfo
=
os
.
path
.
join
(
egg_info_dir
,
'PKG-INFO'
)
assert
'Requires-Python: >=1.2.3'
in
open
(
pkginfo
).
read
().
split
(
'
\
n
'
)
def
test_manifest_maker_warning_suppresion
(
self
):
fixtures
=
[
"standard file not found: should have one of foo.py, bar.py"
,
"standard file 'setup.py' not found"
]
for
msg
in
fixtures
:
assert
manifest_maker
.
_should_suppress_warning
(
msg
)
def
_run_install_command
(
self
,
tmpdir_cwd
,
env
,
cmd
=
None
,
output
=
None
):
environ
=
os
.
environ
.
copy
().
update
(
HOME
=
env
.
paths
[
'home'
],
...
...
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