Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3.2] unable to build numexpr package #183

Open
tuxmaster5000 opened this issue Apr 11, 2019 · 9 comments
Open

[3.3.2] unable to build numexpr package #183

tuxmaster5000 opened this issue Apr 11, 2019 · 9 comments

Comments

@tuxmaster5000
Copy link

An call to pyp2rpm -o epel7 numexpr only results in:
Failed to extract data from setup.py script.

@hroncok
Copy link
Member

hroncok commented Apr 11, 2019

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)

@tuxmaster5000
Copy link
Author

Can we add an warning an catch empty entry's in the array?

@hroncok
Copy link
Member

hroncok commented Apr 12, 2019

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.

@hroncok
Copy link
Member

hroncok commented Apr 12, 2019

Hint: search for parse_requirements function and add a conditional in there.

@tuxmaster5000
Copy link
Author

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.

@tuxmaster5000
Copy link
Author

After searching the source code, I found the log file.
It will be nicer when the name of the logfile will shown on run.

@hroncok
Copy link
Member

hroncok commented Apr 17, 2019

I agree.

@gordonmessmer
Copy link
Member

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.

@00willo
Copy link

00willo commented Aug 27, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants