Bug 1575270 - Python: Make sure rpm installed packages have "rpm" in INSTALLER
Summary: Python: Make sure rpm installed packages have "rpm" in INSTALLER
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
Depends On: 1685582
TreeView+ depends on / blocked
Reported: 2018-05-05 14:37 UTC by Miro Hrončok
Modified: 2019-07-23 13:20 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2019-07-23 13:20:34 UTC
Type: Bug

Attachments (Terms of Use)

Description Miro Hrončok 2018-05-05 14:37:46 UTC
This is one of the long term plans that nobody has time to do :)

Python packages have INSTALLER file. We should make sure that it is present for our packages and that it says rpm instead of pip.

See https://src.fedoraproject.org/rpms/python-pip/pull-request/5 for initial discussion.

> Ideally, pip install should have a switch to to set what will go into the
> INSTALLER file and then we can use this in python-rpm-macros.

> Note that we mostly use python setup.py install, not pip.

> As far as a longer term answer to "How to reliably set INSTALLER
> appropriately?" goes, I think it would be better if there was an RPM file
> trigger in the base Python package that overwrote the INSTALLER files for
> anything installed via RPM at install time. That way it would automatically
> do the right thing for all RPM managed Python packages with dist-info and
> egg-info directories, whether those packages are old or new, Fedora built,
> or third party.
> (Such a file trigger could potentially even synthesise dist-info directories
> for packages that don't have them, but doing that would require defining an
> upstream convention for reserving a suitable namesspace - pursuing such an
> idea would be a lot more feasible now that legacy PyPI has been shutdown).

Comment 1 Petr Viktorin 2018-10-01 12:33:20 UTC
Most likely a goal for Fedora 31

Comment 2 Miro Hrončok 2019-06-25 13:19:31 UTC
Let's do this with the %pyproject macros. Already marked as blocked on bz1685582.

Comment 3 Miro Hrončok 2019-07-23 13:20:34 UTC
%pyproject macros do this, and the old %py3_install macros don't have INSTALLER at all. Let's just keep them as they are.

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