Bug 1476364 - Python packages cannot list "dnf" as a dependency in their setup.py files
Python packages cannot list "dnf" as a dependency in their setup.py files
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-28 13:35 EDT by Randy Barlow
Modified: 2017-07-28 14:33 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-28 14:19:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Randy Barlow 2017-07-28 13:35:49 EDT
Description of problem:
Bodhi has a dependency on the dnf Python bindings. Today I wanted to declare that dependency by adding "dnf" to the bodhi-client install_requires[0]. When I did this, setup.py would not allow the client to be installed because it could not find dnf.

I believe this happens because dnf does not seem to have a setup.py itself. pip freeze does not show "dnf" in its output, so setuptools does not know that it is installed (or what version it is).

Please use setuptools to install dnf's Python library so that third party tools can list it as a dependency in their setup.py files.

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to Reproduce:
1. pip freeze | grep dnf

Actual results:
<no output>

Expected results:
$ pip freeze | grep dnf

Additional info:
[0] https://github.com/fedora-infra/bodhi/blob/2.8.1/setup.py#L113
Comment 1 Igor Gnatenko 2017-07-28 14:19:22 EDT
they shouldn't ;)

dnf will not be available on pypi in any near future.
Comment 2 Randy Barlow 2017-07-28 14:33:59 EDT
Packages don't have to be on PyPI to be listed as dependencies in setup.py files - they just have to be built with setuptools. It is still useful to be able to declare dependencies in a consistent way (such as a requirements.txt) even when there are dependencies that are not found on PyPI.

Note You need to log in before you can comment on or make changes to this bug.