Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#15 closed defect (fixed)

zfec 1.4.23 fails to build

Reported by: vrusinov Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:
Launchpad Bug:

Description

There are several problems in tarball:

$ python setup.py build
Traceback (most recent call last):                                                                                                                                                                                                           
  File "setup.py", line 12, in <module>                                                                                                                                                                                                      
    egg = os.path.realpath(glob.glob('setuptools-*.egg')[0])                                                                                                                                                                                 
IndexError: list index out of range
  1. $ python setup.py build                                                                                                                                                                                 
    Traceback (most recent call last):                                                                                                                                                                                                           
      File "setup.py", line 151, in <module>                                                                                                                                                                                                     
        readmetext = open('README.rst').read()
    IOError: [Errno 2] No such file or directory: 'README.rst'
    
  1. zfec/fec.h is missing:
building 'zfec._fec' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/zfec
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c zfec/fec.c -o build/temp.linux-x86_64-2.7/zfec/fec.o -std=c99
zfec/fec.c:5:17: fatal error: fec.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Change History (4)

comment:1 Changed 13 years ago by vrusinov

attachments are not working for some reason. Here's the patch I've used to fix setup.py:

--- setup.py.orig       2012-04-11 07:20:37.000000000 +0400
+++ setup.py    2012-04-11 11:33:18.484629766 +0400
@@ -9,9 +9,13 @@
 
 import glob, os, re, sys
 
-egg = os.path.realpath(glob.glob('setuptools-*.egg')[0])
-sys.path.insert(0, egg)
-import setuptools; setuptools.bootstrap_install_from = egg
+eggs = glob.glob('setuptools-*.egg')
+if eggs:
+    egg = os.path.realpath(glob.glob('setuptools-*.egg')[0])
+    sys.path.insert(0, egg)
+    import setuptools; setuptools.bootstrap_install_from = egg
+else:
+    import setuptools
 
 from setuptools import Extension, find_packages, setup
 

Or is may be required to include setuptools egg to tarball. But I don't see why this may be necessary - it only adds more maintenance overhead.

After applying this patch and adding missing README.rst and zfec/fec.h it builds fine.

comment:2 Changed 13 years ago by zooko

  • Resolution set to fixed
  • Status changed from new to closed

fixed by zfec-1.4.24 ; please test. Thanks!

comment:3 Changed 13 years ago by davidsarah

Why don't I see any changesets between [399] which tagged 1.4.23, and [400] which tagged 1.4.24?

comment:4 Changed 13 years ago by zooko

The problem with zfec-1.4.23 was that I built it on a system that didn't have setuptools_darcs installed, and so it silently built an sdist -- a source .tar.gz -- that lacked critical files like zfec/fec.h. My fix was to install setuptools_darcs and build it again, and I added a new tag to bump the version number so that I could direct people to zfec-1.4.24, and host a new tarball labeled 1.4.24 on pypi.python.org.

The longer-term fix would be to use a MANIFEST.in instead of the setuptools revision control integration to determine which files get included in an sdist.

Note: See TracTickets for help on using tickets.