[Python-checkins] r50544 - in sandbox/branches/setuptools-0.6: setuptools.txt setuptools/command/egg_info.py setuptools/command/sdist.py
phillip.eby
python-checkins at python.org
Mon Jul 10 23:17:17 CEST 2006
Author: phillip.eby
Date: Mon Jul 10 23:17:16 2006
New Revision: 50544
Modified:
sandbox/branches/setuptools-0.6/setuptools.txt
sandbox/branches/setuptools-0.6/setuptools/command/egg_info.py
sandbox/branches/setuptools-0.6/setuptools/command/sdist.py
Log:
Fixed redundant warnings about missing ``README`` file(s); it should now
appear only if you are actually a source distribution.
(backport from trunk)
Modified: sandbox/branches/setuptools-0.6/setuptools.txt
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools.txt (original)
+++ sandbox/branches/setuptools-0.6/setuptools.txt Mon Jul 10 23:17:16 2006
@@ -2570,6 +2570,9 @@
* Added ``--no-date`` and ``--no-svn-revision`` options to ``egg_info``
command, to allow suppressing tags configured in ``setup.cfg``.
+ * Fixed redundant warnings about missing ``README`` file(s); it should now
+ appear only if you are actually a source distribution.
+
0.6b3
* Fix ``bdist_egg`` not including files in subdirectories of ``.egg-info``.
Modified: sandbox/branches/setuptools-0.6/setuptools/command/egg_info.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/command/egg_info.py (original)
+++ sandbox/branches/setuptools-0.6/setuptools/command/egg_info.py Mon Jul 10 23:17:16 2006
@@ -281,9 +281,9 @@
self.execute(file_util.write_file, (self.manifest, files),
"writing manifest file '%s'" % self.manifest)
-
-
-
+ def warn(self, msg): # suppress missing-file warnings from sdist
+ if not msg.startswith("standard file not found:"):
+ sdist.warn(self, msg)
def add_defaults(self):
sdist.add_defaults(self)
Modified: sandbox/branches/setuptools-0.6/setuptools/command/sdist.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/command/sdist.py (original)
+++ sandbox/branches/setuptools-0.6/setuptools/command/sdist.py Mon Jul 10 23:17:16 2006
@@ -142,9 +142,9 @@
ei_cmd = self.get_finalized_command('egg_info')
self.filelist = ei_cmd.filelist
self.filelist.append(os.path.join(ei_cmd.egg_info,'SOURCES.txt'))
-
+ self.check_readme()
self.check_metadata()
- self.make_distribution()
+ self.make_distribution()
dist_files = getattr(self.distribution,'dist_files',[])
for file in self.archive_files:
@@ -162,3 +162,44 @@
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
raise
+ def check_readme(self):
+ alts = ("README", "README.txt")
+ for f in alts:
+ if os.path.exists(f):
+ return
+ else:
+ self.warn(
+ "standard file not found: should have one of " +', '.join(alts)
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
More information about the Python-checkins
mailing list