[Python-checkins] r50543 - sandbox/trunk/setuptools/setuptools/command/egg_info.py sandbox/trunk/setuptools/setuptools/command/sdist.py
phillip.eby
python-checkins at python.org
Mon Jul 10 23:14:28 CEST 2006
Author: phillip.eby
Date: Mon Jul 10 23:14:27 2006
New Revision: 50543
Modified:
sandbox/trunk/setuptools/setuptools/command/egg_info.py
sandbox/trunk/setuptools/setuptools/command/sdist.py
Log:
Don't warn about missing README(.txt) unless creating an sdist
Modified: sandbox/trunk/setuptools/setuptools/command/egg_info.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/egg_info.py (original)
+++ sandbox/trunk/setuptools/setuptools/command/egg_info.py Mon Jul 10 23:14:27 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/trunk/setuptools/setuptools/command/sdist.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/sdist.py (original)
+++ sandbox/trunk/setuptools/setuptools/command/sdist.py Mon Jul 10 23:14:27 2006
@@ -142,7 +142,7 @@
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()
@@ -161,3 +161,45 @@
# dying and thus masking the real error
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