#31 Distutils can't make an rpm from psyco

closed-fixed
nobody
5
2004-03-04
2004-01-23
No

Most python packages can be made into RPMs using distutils:

python setup.py bdist_rpm

However this fails with psyco:

...
hard linking test/test3.py -> psyco-1.1.1/test
hard linking test/test5.py -> psyco-1.1.1/test
tar -cf dist/psyco-1.1.1.tar psyco-1.1.1
gzip -f9 dist/psyco-1.1.1.tar
removing 'psyco-1.1.1' (and everything under it)
copying dist/psyco-1.1.1.tar.gz ->
build/bdist.linux-i686/rpm/SOURCES
building RPMs
rpmbuild -ba --define _topdir
/home/jss/psyco-1.1.1/build/bdist.linux-i686/rpm
--clean build/bdist.linux-i686/rpm/SPECS/psyco.spec
error: File
/home/jss/psyco-1.1.1/build/bdist.linux-i686/rpm/psyco/psyco-1.1.1.tar.gz:
No such file or directory
error: command 'rpmbuild' failed with exit status 1

If you copy the missing file, then it fails again with
a different error.:

...
+ unset DISPLAY
+ env 'CFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686'
python setup.py build
Traceback (most recent call last):
File "setup.py", line 83, in ?
execfile(os.path.join(SOURCEDIR, 'files.py'), data)
IOError: [Errno 2] No such file or directory: 'c/files.py'
error: Bad exit status from
/home/jss/psyco-1.1.1/build/bdist.linux-i686/rpm/tmp/rpm-tmp.23601
(%build)

RPM build errors:
Bad exit status from
/home/jss/psyco-1.1.1/build/bdist.linux-i686/rpm/tmp/rpm-tmp.23601
(%build)
error: command 'rpmbuild' failed with exit status 1

I don't have any experience with using distutils as a
developer, but it would be very useful to have psyco as
an RPM for those users with rpm-based systems.

Discussion

  • Jeremy Sanders

    Jeremy Sanders - 2004-01-23

    Logged In: YES
    user_id=8953

    Sorry - the report is inaccurate. The first problem was due
    to a dodgy environment. The actual problem is the second
    one. With more detail the build process shows:

    + /usr/bin/gzip -dc
    /root/psyco-1.1.1/build/bdist.linux-i686/rpm/SOURCES/psyco-1.1.1.tar.gz
    + tar -xvvf -
    drwxr-xr-x root/root 0 2004-01-23 15:01:05 psyco-1.1.1/
    drwxr-xr-x root/root 0 2004-01-23 15:01:05
    psyco-1.1.1/c/
    -rw-r--r-- 1000/users 26065 2003-08-14 10:40:39
    psyco-1.1.1/c/psyco.c
    drwxr-xr-x root/root 0 2004-01-23 15:01:05
    psyco-1.1.1/psyco/
    -rw-r--r-- 1000/users 1696 2003-08-14 10:40:39
    psyco-1.1.1/psyco/__init__.py
    -rw-r--r-- 1000/users 1821 2003-08-14 10:40:39
    psyco-1.1.1/psyco/classes.py
    -rw-r--r-- 1000/users 8202 2003-08-14 10:40:39
    psyco-1.1.1/psyco/core.py
    -rw-r--r-- 1000/users 2532 2003-08-14 10:40:39
    psyco-1.1.1/psyco/logger.py
    -rw-r--r-- 1000/users 11025 2003-08-14 10:40:39
    psyco-1.1.1/psyco/profiler.py
    -rw-r--r-- 1000/users 5307 2003-08-19 11:10:09
    psyco-1.1.1/psyco/support.py
    drwxr-xr-x root/root 0 2004-01-23 15:01:05
    psyco-1.1.1/test/
    -rw-r--r-- 1000/users 4936 2003-08-14 10:40:39
    psyco-1.1.1/test/test1.py
    -rw-r--r-- 1000/users 8039 2003-08-14 10:40:39
    psyco-1.1.1/test/test3.py
    -rw-r--r-- 1000/users 4867 2003-08-14 10:40:39
    psyco-1.1.1/test/test5.py
    -rw-r--r-- 1000/users 3212 2003-08-14 10:40:39
    psyco-1.1.1/README.txt
    -rw-r--r-- 1000/users 4651 2003-08-18 15:42:55
    psyco-1.1.1/setup.py
    -rw-r--r-- root/root 256 2004-01-23 15:01:05
    psyco-1.1.1/PKG-INFO
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd psyco-1.1.1
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chown -Rhf root .
    ++ /usr/bin/id -u
    + '[' 0 = 0 ']'
    + /bin/chgrp -Rhf root .
    + /bin/chmod -Rf a+rX,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.92638
    + umask 022
    + cd /root/psyco-1.1.1/build/bdist.linux-i686/rpm/BUILD
    + cd psyco-1.1.1
    + LANG=C
    + export LANG
    + unset DISPLAY
    + env 'CFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686' python
    setup.py build
    Traceback (most recent call last):
    File "setup.py", line 83, in ?
    execfile(os.path.join(SOURCEDIR, 'files.py'), data)
    IOError: [Errno 2] No such file or directory: 'c/files.py'
    error: Bad exit status from /var/tmp/rpm-tmp.92638 (%build)

    RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.92638 (%build)
    error: command 'rpmbuild' failed with exit status 1

    It looks to me as though distutils doesn't know about all
    the files it needs to make up a tar file of the package. The
    tar it creates is missing files.py, for example, which is
    needed to make the package.

     
  • Armin Rigo

    Armin Rigo - 2004-01-25

    Logged In: YES
    user_id=4771

    My distutils experience is limited. I think we need a MANIFEST file... c/files.py is only an internal tool, not something that should be included in a binary distribution.

     
  • Armin Rigo

    Armin Rigo - 2004-03-04

    Logged In: YES
    user_id=4771

    I have included a (generated) MANIFEST file, and it seems to fix the problem.

     
  • Armin Rigo

    Armin Rigo - 2004-03-04
    • status: open --> closed-fixed
     

Log in to post a comment.