Bug 1476364

Summary: Python packages cannot list "dnf" as a dependency in their setup.py files
Product: [Fedora] Fedora Reporter: Randy Barlow <randy>
Component: dnfAssignee: rpm-software-management
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmach, mhatina, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-28 18:19:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Randy Barlow 2017-07-28 17:35:49 UTC
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):
dnf-2.5.1-1.fc27.noarch


How reproducible:
Every time.


Steps to Reproduce:
1. pip freeze | grep dnf


Actual results:
<no output>


Expected results:
$ pip freeze | grep dnf
dnf==2.5.1


Additional info:
[0] https://github.com/fedora-infra/bodhi/blob/2.8.1/setup.py#L113

Comment 1 Igor Gnatenko 2017-07-28 18:19:22 UTC
they shouldn't ;)

dnf will not be available on pypi in any near future.

Comment 2 Randy Barlow 2017-07-28 18:33:59 UTC
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.