Hi All,

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?

Thanks!
-kurt


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

Traceback (most recent call last):
 File "setup.py", line 2, in <module>
   from setuptools import setup, Extension
 File "/sw/lib/python2.5/site-packages/setuptools/__init__.py", line 2, in
<module>
   from setuptools.extension import Extension, Library
 File "/sw/lib/python2.5/site-packages/setuptools/extension.py", line 2, in
<module>
   from dist import _get_unpatched
 File "/sw/lib/python2.5/site-packages/setuptools/dist.py", line 6, in
<module>
   from setuptools.command.sdist import sdist
 File "/sw/lib/python2.5/site-packages/setuptools/command/sdist.py", line
3, in <module>
   import os, re, sys, pkg_resources
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2499, in
<module>
   add_activation_listener(lambda dist: dist.activate())
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 599, in
subscribe
   callback(dist)
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2499, in
<lambda>
   add_activation_listener(lambda dist: dist.activate())
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 2048, in
activate
   map(declare_namespace, self._get_metadata('namespace_packages.txt'))
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1667, in
declare_namespace
   _handle_ns(packageName, path_item)
 File "/sw/lib/python2.5/site-packages/pkg_resources.py", line 1638, in
_handle_ns
   loader.load_module(packageName); module.__path__ = path
 File "/sw/lib/python2.5/pkgutil.py", line 238, in load_module
   mod = imp.load_module(fullname, self.file, self.filename, self.etc)
 File 
"/sw/src/fink.build/quadtree-py25-0.1.1-1/pcl-0.11-20070118/externals/Quadtree/quadtree/__init__.py",
line 2, in <module>
   from _tree import Quadtree
ImportError: No module named _tree

cat quadtree/__init__.py

from _tree import Quadtree


And, here is the setup.py file:

from setuptools import setup, Extension
_tree = Extension('quadtree._tree',
                 sources=['quadtree/_treemodule.c',
                          'shapelib/shptree.c',
                          'shapelib/shpopen.c'],
                 include_dirs=['shapelib']
                 )
setup(name          = 'Quadtree',
     version       = '0.1.1',
     description   = 'Quadtree spatial index for Python GIS',
     license       = 'BSD',
     keywords      = 'spatial index',
     author        = 'Sean Gillies',
     author_email  = '[EMAIL PROTECTED]',
     maintainer    = 'Sean Gillies',
     maintainer_email  = '[EMAIL PROTECTED]',
     url               = 'http://icon.stoa.org/trac/pleiades/wiki/QuadTree
',
     packages      = ['quadtree'],
     namespace_packages    = ['quadtree'],
     ext_modules   = [_tree],
     classifiers   = [
       'Development Status :: 3 - Alpha',
       'Intended Audience :: Developers',
       'Intended Audience :: Science/Research',
       'License :: OSI Approved :: BSD License',
       'Operating System :: OS Independent',
       'Programming Language :: C',
       'Programming Language :: Python',
       'Topic :: Scientific/Engineering :: GIS',
       'Topic :: Database',
       ],
)
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to