fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
127 stars 39 forks source link

Cannot build fabio module #37

Closed valmar closed 8 years ago

valmar commented 8 years ago

I have been trying to build the fabio module:

https://pypi.python.org/pypi/fabio/0.3.0

However, pyp2rpm seems not to detect a dependency on numpy in the setup file. After creating the spec file with pyp2rpm, the rpmbuild -bb command fails with (I paste only the last lines):

.... Traceback (most recent call last): File "setup.py", line 32, in import numpy as np ImportError: No module named 'numpy' error: Bad exit status from /var/tmp/rpm-tmp.16FnZ9 (%build)

Thanks for looking into this. I am available for tests, further information, etc.

mcyprian commented 8 years ago

pyp2rpm extracts metadata from setup.py's setup function or metadata.json file. In this case install, setup and test requires are not listed in setup function call:

 setup(name='fabio',
          version=get_version(),
          author="Henning Sorensen, Erik Knudsen, Jon Wright, Regis Perdreau, Jérôme Kieffer, Gael Goret, Brian Pauw",
          author_email="fable-talk@lists.sourceforge.net",
          description='Image IO for fable',
          url="http://fable.wiki.sourceforge.net/fabio",
          download_url="http://sourceforge.net/projects/fable/files/fabio/",
          ext_package="fabio",
          ext_modules=extensions,
          packages=packages,
          package_dir=package_dir,
          test_suite="test",
          cmdclass=cmdclass,
          scripts=script_files,
          classifiers=classifiers,)

I am afraid pyp2rpm can't do much better job here.

hroncok commented 8 years ago

They have it in git https://github.com/kif/fabio/commit/e045ddd6dec3f6af2c533585cbbfc52fa754e68e

hroncok commented 8 years ago

...so you just have to wait for the next release.