fedora-python / fedora-python/pyp2rpm

unhelpful error message when extract_dist fails

Open
#152 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
129
Forks
42
PR merge metrics
No merged PRs in 30d

Description

```
$ pyp2rpm ./dist/conu-0.0.1.dev0.tar.gz
Failed to extract data from setup.py script.
```

Ehm, that's not helpful.

So I tried `-s` switch and it produced more logs:
```
INFO Pyp2rpm initialized.
INFO Using /home/tt/rpmbuild/SOURCES as directory to save source.
INFO Local file: ./dist/conu-0.0.1.dev0.tar.gz copyed to /home/tt/rpmbuild/SOURCES/conu-0.0.1.dev0.tar.gz.
INFO Getting metadata from setup.py using SetupPyMetadataExtractor.
INFO Running extract_dist command with: /usr/bin/python3
ERROR Subprocess failed, stdout: , stderr: Traceback (most recent call last):
File "setup.py", line 68, in
install_requires=get_requirements()
File "setup.py", line 33, in get_requirements
with open("./requirements.txt") as fd:
FileNotFoundError: [Errno 2] No such file or directory: './requirements.txt'

ERROR Could not extract metadata with: /usr/bin/python3
INFO Running extract_dist command with: /usr/bin/python2
ERROR Subprocess failed, stdout: , stderr: Traceback (most recent call last):
File "setup.py", line 68, in
install_requires=get_requirements()
File "setup.py", line 33, in get_requirements
with open("./requirements.txt") as fd:
IOError: [Errno 2] No such file or directory: './requirements.txt'

ERROR Could not extract metadata with: /usr/bin/python2
Failed to extract data from setup.py script.
```

Would it be possible to either provide better error message or log more by default?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.