You are not logged in.

#1 2007-04-14 14:57:06

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

[solved] setup.py and egg_info: cannot create site-packages dir

I'm trying to write a PKGBUILD for a program I wrote that comes with a setup.py. The problem I'm having is that setup.py doesn't create the site-packages directory specified by --root= so that the install egg_info command succeeds. It'll give me this error:

[root@tungsten weatherget-0.4]# python setup.py install --root=../../pkg/
running install
running build
running build_scripts
running install_scripts
changing mode of ../../pkg/usr/bin/weatherget to 755
running install_data
running install_egg_info
Writing ../../pkg/usr/lib/python2.5/site-packages/weatherget-0.4-py2.5.egg-info
error: ../../pkg/usr/lib/python2.5/site-packages/weatherget-0.4-py2.5.egg-info: No such file or directory

However, if setup.py is run without the --root= switch, in other words installs directly to my rootfs, it completes successfully.
Now I don't have packages= set in setup.py because I have not site-packages, this is just one main script to be place in /usr/bin/. IF I create a packages directory with an empty __init__.py file, and specify this in setup.py, the install goes through fine with --root set.

Obviously I can have the site-packages directory created in the PKGBUILD but why must I do this? Does setup require at least an empty packages directory or is there some switch to setup.py I must run? WTF? This all worked fine with python 2.4.

setup.py:

#!/usr/bin/python

from distutils.core import setup

myver="0.4"

setup(name="weatherget",
        version=myver,
        description="CLI weather reporting tool",
        author="Tyler Gates",
        author_email="TGates81@gmail.com",
        license="GPL",
        platforms='linux2',
        scripts=['weatherget'],
        data_files=[('/usr/share/man/man1', ['weatherget.1']),
        ('/usr/share/doc/weatherget-'+myver, ['COPYING', 'README', 'AUTHORS', 'CHANGELOG'])])

Offline

#2 2007-04-16 02:20:27

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: [solved] setup.py and egg_info: cannot create site-packages dir

F$% it. I'll just go with the packages= route. Marking solved..

Offline

Board footer

Powered by FluxBB