Bug 1476364 - Python packages cannot list "dnf" as a dependency in their setup.py files
Summary: Python packages cannot list "dnf" as a dependency in their setup.py files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 17:35 UTC by Randy Barlow
Modified: 2017-07-28 18:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-28 18:19:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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