MaciekAber / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

pysam on PIP does not install #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I tried this on several Linux machines with different distributions/configs and 
fails the same way:

building 'csamtools' extension

gcc -pthread -fno-strict-aliasing -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 
-DFILE_OFFSET_BITS=64 -D_USE_KNETFILE= -Isamtools -Ipysam 
-I/usr/include/python2.6 -c pysam/csamtools.c -o 
build/temp.linux-x86_64-2.6/pysam/csamtools.o

gcc: pysam/csamtools.c: No such file or directory

gcc: no input files

error: command 'gcc' failed with exit status 1

On the other hand, if this is checked out manually:

hg clone https://pysam.googlecode.com/hg/ pysam && cd pysam && python setup.py 
install

It installs and works perfectly.

Original issue reported on code.google.com by brainc...@gmail.com on 31 Jan 2011 at 3:45

GoogleCodeExporter commented 8 years ago
Thanks,

I think the problem might be that cython is not installed. I have added 
csamtools.c to
MANIFEST.in, so it should be now part of the tarball in version 0.4.

Best wishes,
Andreas

Original comment by andreas....@gmail.com on 10 Feb 2011 at 10:37

GoogleCodeExporter commented 8 years ago
Cython is installed (had to install it by pip), but still, it should be 
installed automatically by pysam since "install_requires" contains cython... 
but it does not install it, strange.

Anyway, correct me if I'm missing something but csamtools.c does not seem to be 
there on the repository. Has it been removed accidentally at some point maybe ?:

$ hg clone https://pysam.googlecode.com/hg/ pysam && cd pysam && python 
setup.py install && find . -iname "csamtools.c"

(...)
reading manifest template 'MANIFEST.in'
warning: no files found matching 'pysam/csamtools.c' <----
writing manifest file 'pysam.egg-info/SOURCES.txt'
(...)
$

Original comment by brainc...@gmail.com on 13 Feb 2011 at 12:17

GoogleCodeExporter commented 8 years ago
Ok, my bad, csamtools.c is generated by cython and did not had installed 
"pyrex" as you suggest on the source code:

## note that for automatic cythoning, 
## both pyrex and cython need to be installed.
## see http://mail.python.org/pipermail/distutils-sig/2007-September/008204.html

But the following trivial patch should be actually enough to get this fixed 
once and for all, isn't it ?:

diff -r 3fb4eda6d63a setup.py
--- a/setup.py  Mon Feb 14 09:24:44 2011 +0000
+++ b/setup.py  Wed Feb 16 21:57:53 2011 +0100
@@ -170,7 +170,7 @@
     'requires' : ['cython (>=0.12)'],
     'ext_modules': [samtools, tabix],
     'cmdclass' : {'build_ext': build_ext},
-    'install_requires' : ['cython>=0.12.1',], 
+    'install_requires' : ['cython>=0.12.1', 'pyrex>=0.9.8.6'],
     }

 if __name__=='__main__':

Thanks,
Roman

Original comment by brainc...@gmail.com on 16 Feb 2011 at 8:59

GoogleCodeExporter commented 8 years ago
Is it unreasonable to install pyrex together with cython by default on setup.py 
?

Original comment by brainc...@gmail.com on 28 Feb 2011 at 4:24