Commit dcd12bd1 authored by PJ Eby's avatar PJ Eby

Backport doc fixes and 2.4-only -m safety check to 0.6 branch

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4045791
parent 4e818019
...@@ -545,9 +545,7 @@ The current analysis approach is fairly conservative; it currenly looks for: ...@@ -545,9 +545,7 @@ The current analysis approach is fairly conservative; it currenly looks for:
* Possible use of ``inspect`` functions that expect to manipulate source files * Possible use of ``inspect`` functions that expect to manipulate source files
(e.g. ``inspect.getsource()``) (e.g. ``inspect.getsource()``)
* Any data files or C extensions (this restriction will be removed in a future * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)
release, once the ``pkg_resources`` runtime has been hardened for multi-user
environments)
If any of the above are found in the package being installed, EasyInstall will 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 assume that the package cannot be safely run from a zipfile, and unzip it to
......
...@@ -393,7 +393,7 @@ def scan_module(egg_dir, base, name, stubs): ...@@ -393,7 +393,7 @@ def scan_module(egg_dir, base, name, stubs):
log.warn("%s: module MAY be using inspect.%s", module, bad) log.warn("%s: module MAY be using inspect.%s", module, bad)
safe = False safe = False
if '__name__' in symbols and '__main__' in symbols and '.' not in module: 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) log.warn("%s: top-level module may be 'python -m' script", module)
safe = False safe = False
return safe return safe
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment