[3.3.2] unable to build numexpr package
Opened this issue · 9 comments
An call to pyp2rpm -o epel7 numexpr only results in:
Failed to extract data from setup.py script.
This is most likely caused by https://github.com/pydata/numexpr/blob/master/requirements.txt having an extra line and https://github.com/pydata/numexpr/blob/364bac13d84524e0e01db892301b2959d822dcff/setup.py#L25 adding an empty requirement to install_requires.
The requirements are now:
['numpy>=1.7', '']
And pyp2rpm blows on the second one with:
WARNING Unparsable dependency .
Traceback (most recent call last):
File "/home/churchyard/Dokumenty/RedHat/pyp2rpm/pyp2rpm/dependency_parser.py", line 61, in deps_from_pyp_format
parsed.append(Requirement.parse(req))
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3088, in parse
req, = parse_requirements(s)
ValueError: not enough values to unpack (expected 1, got 0)
Can we add an warning an catch empty entry's in the array?
This project is on life support. If you send a Pull Request, I can review it, but I'm not available to do any fixes now.
Hint: search for parse_requirements function and add a conditional in there.
For testing I have remove the empty line, but it will not resolve it.
Exists there an debug function for it? --help will not shown something like that.
After searching the source code, I found the log file.
It will be nicer when the name of the logfile will shown on run.
I agree.
In case someone else finds this bug report:
When I run pyp2rpm for numexpr, the log records:
INFO Downloaded package from PyPI: /tmp/numexpr-2.6.9.tar.gz.
INFO Getting metadata from setup.py using SetupPyMetadataExtractor.
INFO Running extract_dist command with: /home/gordon/git/pyp2rpm/.tox/py37/bin/python3
ERROR Subprocess failed, stdout: , stderr: Traceback (most recent call last):
File "setup.py", line 228, in <module>
setup_package()
File "setup.py", line 65, in setup_package
from numpy.distutils.core import setup
ModuleNotFoundError: No module named 'numpy'
I think the other failure conditions already have useful error output. If it would be helpful to show the debug logs in this failure condition, I've created PR #203 for consideration.
Just tried this, and the original issue appears resolved.
Once you install numpy into the site-packages used by the interpreter, the spec file generates fine. So, no remaining issues.