[Python-checkins] r45790 - in sandbox/trunk/setuptools: EasyInstall.txt setuptools/command/bdist_egg.py

phillip.eby python-checkins at python.org
Fri Apr 28 20:12:21 CEST 2006


Author: phillip.eby
Date: Fri Apr 28 20:12:18 2006
New Revision: 45790

Modified:
   sandbox/trunk/setuptools/EasyInstall.txt
   sandbox/trunk/setuptools/setuptools/command/bdist_egg.py
Log:
Python 2.5 supports -m w/zipped modules, and Python 2.3 has no -m, so 
there's no need to treat script modules as zip-unsafe unless we're 
running 2.4 exactly.


Modified: sandbox/trunk/setuptools/EasyInstall.txt
==============================================================================
--- sandbox/trunk/setuptools/EasyInstall.txt	(original)
+++ sandbox/trunk/setuptools/EasyInstall.txt	Fri Apr 28 20:12:18 2006
@@ -549,6 +549,8 @@
  * Possible use of ``inspect`` functions that expect to manipulate source files
    (e.g. ``inspect.getsource()``)
 
+ * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)
+
 If any of the above are found in the package being installed, EasyInstall will
 assume that the package cannot be safely run from a zipfile, and unzip it to
 a directory instead.  You can override this analysis with the ``-zip-ok`` flag,

Modified: sandbox/trunk/setuptools/setuptools/command/bdist_egg.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/bdist_egg.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/bdist_egg.py	Fri Apr 28 20:12:18 2006
@@ -393,7 +393,7 @@
                 log.warn("%s: module MAY be using inspect.%s", module, bad)
                 safe = False
     if '__name__' in symbols and '__main__' in symbols and '.' not in module:
-        if get_python_version()>="2.4":
+        if sys.version[:3]=="2.4":  # -m works w/zipfiles in 2.5
             log.warn("%s: top-level module may be 'python -m' script", module)
             safe = False
     return safe


More information about the Python-checkins mailing list