Under setuptools 0.6c9, py2app 0.3.6, OS X 10.4.11, when running the
py2app command, modulegraph raises an ImportError trying to find
pkg_resources. I'm not sure if this is a setuptools issue, a py2app
issue, or a modulegraph issue.
Here's the output:
$ ./bin/python-local setup.py py2app
running py2app
running build_py
running egg_info
writing requirements to src/bash.egg-info/requires.txt
writing src/bash.egg-info/PKG-INFO
writing top-level names to src/bash.egg-info/top_level.txt
writing dependency_links to src/bash.egg-info/dependency_links.txt
writing entry points to src/bash.egg-info/entry_points.txt
writing manifest file 'src/bash.egg-info/SOURCES.txt'
running build_scripts
Traceback (most recent call last):
File
"/Users/deyk/code/py/spaaace/trunk/eggs/py2app-0.3.6-py2.5.egg/py2app/build_app.py",
line 548, in _run
self.run_normal()
File
"/Users/deyk/code/py/spaaace/trunk/eggs/py2app-0.3.6-py2.5.egg/py2app/build_app.py",
line 600, in run_normal
mf = self.get_modulefinder()
File
"/Users/deyk/code/py/spaaace/trunk/eggs/py2app-0.3.6-py2.5.egg/py2app/build_app.py",
line 508, in get_modulefinder
debug=debug,
File "build/bdist.macosx-10.3-fat/egg/modulegraph/find_modules.py",
line 243, in find_modules
find_needed_modules(mf, scripts, includes, packages)
File "build/bdist.macosx-10.3-fat/egg/modulegraph/find_modules.py",
line 171, in find_needed_modules
mf.import_hook(mod)
File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py",
line 245, in import_hook
q, tail = self.find_head_package(parent, name)
File "build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py",
line 296, in find_head_package
raise ImportError, "No module named " + qname
ImportError: No module named pkg_resources
> /Users/deyk/code/py/spaaace/trunk/build/bdist.macosx-10.3-fat/egg/modulegraph/modulegraph.py(296)find_head_package()
(Pdb) import setuptools
(Pdb) setuptools.__version__
'0.6c9'
(Pdb) import pkg_resources
(Pdb)
As you can see, pkg_resources is importable, at least from within the
debugger, but I don't understand how exactly modulegraph works its
magic. Any ideas? (I've attached my setup.py, in case it might shed
light.)
Thanks for your time.
David Eyk
# -*- coding: utf-8 -*-
"""setup -- setuptools setup file for Spaaace.
$Author: eykd $
$Rev: 1191 $
$Date: 2008-06-12 10:49:50 -0500 (Thu, 12 Jun 2008) $
"""
__author__ = "$Author: eykd $"
__revision__ = "$Rev: 1191 $"
__version__ = "0.2"
__release__ = '.r'.join((__version__, __revision__[6:-2]))
__date__ = "$Date: 2008-06-12 10:49:50 -0500 (Thu, 12 Jun 2008) $"
import sys
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
APP = ['src/Spaaace.py',]
DATA_FILES = []
APP_OPTIONS = {'argv_emulation': False,
'optimize': '2',
#'excludes': ['pkg_resources',],
'includes': ['pkg_resources',],
}
INSTALL_REQUIRES=['CherryPy<=3.0.3',
'pyglet',
'Cellulose',
'Mako',
'numpy',
]
GUI_SCRIPTS = ['spaaace = kernel:main',]
SCRIPTS = []
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app',],
app=APP,
options={'py2app':APP_OPTIONS},
)
elif sys.platform == 'win32':
extra_options = dict(
setup_requires=['py2exe'],
app=APP,
)
else:
extra_options = dict(
)
setup(
name = "bash",
version = __version__,
author = "David Eyk",
package_dir = {'': 'src',},
packages = find_packages('src'),
include_package_data = True,
exclude_package_data = {'src':['*.c', '*.h', '*.pyx', '*.pxd']},
data_files=['src/data',],
entry_points={'gui_scripts': GUI_SCRIPTS,
'scripts': SCRIPTS},
scripts=APP,
install_requires=INSTALL_REQUIRES,
zip_safe = False,
test_suite = "nose.collector",
**extra_options
)
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig