I'm not experienced with it either, but I'll take a shot in the dark
here. There is probably a more setuptools-ish way to do this, but this
seems to work.
Without really changing anything, bdist_egg works (once you fix
setup.py - the git repo is still referencing libgeos-3-0-0), but since
there are no extension modules, distutils doesn't know it has to use
the platform-specific filename.
An easy_install on the egg then works, but the DLLs are now installed
relative to the egg itself. I don't personally consider this a bad
thing, but geos.py needs to be updated to get the PATH set correctly:
elif sys.platform == 'win32':
try:
- local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
+ local_dlls =
os.path.abspath(os.path.join(os.path.dirname(__file__), "..\\DLLs"))
original_path = os.environ['PATH']
os.environ['PATH'] = "%s;%s" % (local_dlls, original_path)
_lgeos = CDLL("geos.dll")
Of course, this would now be the wrong path for users of the exe installer.
It might be simpler all around to just include the DLLs in the package
directory itself, maybe in a (platform-specific) subdirectory. I think
the egg and the installer would probably put them in the same place
then.
On Thu, Oct 21, 2010 at 3:18 PM, Sean Gillies <[email protected]> wrote:
> I've no experience at all with easy_install of extension modules on
> Windows. If anybody's got a working solution, I'll be happy to merge
> it.
>
> On Wed, Oct 20, 2010 at 11:19 AM, Ken Watford <[email protected]> wrote:
>> While running the executable win32 installer directly works fine,
>> easy_install (in distribute 0.6.14) doesn't seem to like it. It seems
>> to have trouble with the DLLs (they don't get installed). So if
>> Shapely were installed automatically as a requirement of something
>> else, it would appear to succeed but not work properly. Here's what
>> easy_install says:
>>
>> install_dir C:\Python26\Lib\site-packages\
>> Searching for Shapely
>> Reading http://pypi.python.org/simple/Shapely/
>> Reading http://trac.gispython.org/projects/PCL/wiki/Shapely
>> Reading http://trac.gispython.org/projects/PCL/wiki/ShapeLy
>> Best match: Shapely 1.2.5
>> Downloading
>> http://pypi.python.org/packages/any/S/Shapely/Shapely-1.2.5.win32.exe#md5=ca21552a8e99ae167e869ab1e03f7559
>> Processing Shapely-1.2.5.win32.exe
>> WARNING: can't process DATA/DLLs/geos.dll
>> WARNING: can't process DATA/DLLs/libgeos-3-2-2.dll
>> shapely.geos: module references __file__
>> creating
>> 'c:\users\kwatford\temp\easy_install-b1lnet\Shapely-1.2.5-py2.6-win32.egg'
>> and adding
>> 'c:\users\kwatford\temp\easy_install-b1lnet\Shapely-1.2.5-py2.6-win32.egg.tmp'
>> to it
>> creating C:\python26\lib\site-packages\Shapely-1.2.5-py2.6-win32.egg
>> Extracting Shapely-1.2.5-py2.6-win32.egg to C:\python26\lib\site-packages
>> Adding Shapely 1.2.5 to easy-install.pth file
>> Installing intersect.pyc script to C:\Python26\Scripts
>> Installing dissolve.pyc script to C:\Python26\Scripts
>> Installing dissolve.py script to C:\Python26\Scripts
>> Installing intersect.py script to C:\Python26\Scripts
>>
>> Installed c:\python26\lib\site-packages\shapely-1.2.5-py2.6-win32.egg
>> Processing dependencies for Shapely
>> Finished processing dependencies for Shapely
>>
>>
>> I haven't tried this in Win64 yet, but I imagine it probably fails to
>> work in a similar fashion.
>> _______________________________________________
>> Community mailing list
>> [email protected]
>> http://lists.gispython.org/mailman/listinfo/community
>>
>
> --
> Sean
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community
>
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community