diff options
author | PJ Eby <distutils-sig@python.org> | 2008-01-18 21:51:23 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2008-01-18 21:51:23 +0000 |
commit | 7c4938d53774c51b441970e177ce72cc3bdf68ce (patch) | |
tree | d69680614e16597ee20ded8c4e04d3d66fcfd78f /setuptools/command/bdist_egg.py | |
parent | ce75692a87b83cef9ea539fc76f4a544b1398b35 (diff) | |
download | external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.tar.gz external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.tar.bz2 external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.zip |
chmod/test cleanups and Jython compatibility (backport from trunk)
--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4060062
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 2e9007ce..bb1112c1 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -382,7 +382,7 @@ def analyze_egg(egg_dir, stubs): for flag,fn in safety_flags.items(): if os.path.exists(os.path.join(egg_dir,'EGG-INFO',fn)): return flag - + if not can_scan(): return False safe = True for base, dirs, files in walk_egg(egg_dir): for name in files: @@ -449,6 +449,47 @@ def iter_symbols(code): for name in iter_symbols(const): yield name +def can_scan(): + if not sys.platform.startswith('java') and sys.platform != 'cli': + # CPython, PyPy, etc. + return True + log.warn("Unable to analyze compiled code on this platform.") + log.warn("Please ask the author to include a 'zip_safe'" + " setting (either True or False) in the package's setup.py") + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # Attribute names of options for commands that might need to be convinced to # install to the egg build directory |