Hi All,<br><br>Sorry if this kind of thing has already been discussed. I am packaging quadtree for Mac OSX/fink (deb based package management) and am getting a failed build if the package is alread installed and I am trying to do a rebuild. Can someone point me at what needs to be changed? Is this because quadtree is a namespace?
<br><br>Thanks!<br>-kurt<br><br><br>cd externals/Quadtree && /sw/bin/python2.5 setup.py install --root=/sw/src/fink.build/root-quadtree-py25-0.1.1-1 --single-version-externally-managed<br><br>Traceback (most recent call last):
<br> File "setup.py", line 2, in <module><br> from setuptools import setup, Extension<br> File "/sw/lib/python2.5/site-packages/setuptools/__init__.py", line 2, in <module><br> from
setuptools.extension import Extension, Library<br> File "/sw/lib/python2.5/site-packages/setuptools/extension.py", line 2, in <module><br> from dist import _get_unpatched<br> File "/sw/lib/python2.5/site-packages/setuptools/dist.py", line 6, in <module>
<br> from setuptools.command.sdist import sdist<br> File "/sw/lib/python2.5/site-packages/setuptools/command/sdist.py", line 3, in <module><br> import os, re, sys, pkg_resources<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2499, in <module>
<br> add_activation_listener(lambda dist: dist.activate())<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 599, in subscribe<br> callback(dist)<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2499, in <lambda>
<br> add_activation_listener(lambda dist: dist.activate())<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2048, in activate<br> map(declare_namespace, self._get_metadata('namespace_packages.txt'))
<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1667, in declare_namespace<br> _handle_ns(packageName, path_item)<br> File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1638, in _handle_ns
<br> loader.load_module(packageName); module.__path__ = path<br> File "/sw/lib/python2.5/pkgutil.py", line 238, in load_module<br> mod = imp.load_module(fullname, self.file, self.filename, self.etc)<br> File "/sw/src/fink.build/quadtree-
py25-0.1.1-1/pcl-0.11-20070118/externals/Quadtree/quadtree/__init__.py", line 2, in <module><br> from _tree import Quadtree<br>ImportError: No module named _tree<br><br>cat quadtree/__init__.py <br><br>from _tree import Quadtree
<br><br><br>And, here is the setup.py file:<br><br>from setuptools import setup, Extension<br>_tree = Extension('quadtree._tree',<br> sources=['quadtree/_treemodule.c',<br> 'shapelib/shptree.c',
<br> 'shapelib/shpopen.c'],<br> include_dirs=['shapelib']<br> )<br>setup(name = 'Quadtree',<br> version = '0.1.1',
<br> description = 'Quadtree spatial index for Python GIS',<br> license = 'BSD',<br> keywords = 'spatial index',<br> author = 'Sean Gillies',<br> author_email = '
<a href="mailto:sgillies@frii.com">sgillies@frii.com</a>',<br> maintainer = 'Sean Gillies',<br> maintainer_email = '<a href="mailto:sgillies@frii.com">sgillies@frii.com</a>',<br> url = '
<a href="http://icon.stoa.org/trac/pleiades/wiki/QuadTree">http://icon.stoa.org/trac/pleiades/wiki/QuadTree</a>',<br> packages = ['quadtree'],<br> namespace_packages = ['quadtree'],<br>
ext_modules = [_tree],<br> classifiers = [<br> 'Development Status :: 3 - Alpha',<br> 'Intended Audience :: Developers',<br> 'Intended Audience :: Science/Research',
<br> 'License :: OSI Approved :: BSD License',<br> 'Operating System :: OS Independent',<br> 'Programming Language :: C',<br> 'Programming Language :: Python',<br>
'Topic :: Scientific/Engineering :: GIS',<br> 'Topic :: Database',<br> ],<br>)<br><br><br><br><br>