Bug 1575270

Summary: Python: Make sure rpm installed packages have "rpm" in INSTALLER
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python3Assignee: Miro Hrončok <mhroncok>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, dmalcolm, mhroncok, ncoghlan, pkopkan, pviktori, python-sig, rkuska, shcherbina.iryna, tomspur, torsava
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-23 13:20:34 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:
Bug Depends On: 1685582    
Bug Blocks:    

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.

@torsava:
> 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.

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

@ncoghlan:
> 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.