Bug 1385240

Summary: Please provide the /usr/bin/virtualenv-MAJOR symlinks
Product: [Fedora] Fedora Reporter: Mathieu Bridon <bochecha>
Component: python-virtualenvAssignee: Steve Milner <smilner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fschwarz, mcyprian, mhayden, mrunge, orion, rolf, smilner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-virtualenv-15.0.3-2.fc25 python-virtualenv-15.0.3-2.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-25 04:28:01 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:
Bug Depends On:    
Bug Blocks: 1385244    
Attachments:
Description Flags
Add the /usr/bin/virtualenv-$MAJOR executables none

Description Mathieu Bridon 2016-10-15 15:12:14 UTC
Description of problem:
Currently the python-virtualenv package provides the following executables:

* /usr/bin/py3-virtualenv
* /usr/bin/virtualenv
* /usr/bin/virtualenv-2.7
* /usr/bin/virtualenv-3.5

According to the guidelines, it should also provide:

* /usr/bin/virtualenv-2
* /usr/bin/virtualenv-3

> If executables are to be shipped for both python 2 and python 3:
> * Both python 2 and python 3 variants must provide symlinks with a '-X' and
>   '-X.Y' suffix (python runtime major version, or python runtime major.minor
>   version), unless upstream already provides appropriately versioned
>   executables without the dash.

https://fedoraproject.org/wiki/Packaging:Python#Naming

Please add this to Fedora >= 24, as it shouldn't break anything and would help people writing scripts. (and me, trying to package pew for Fedora)

Comment 1 Mathieu Bridon 2016-10-15 15:42:25 UTC
Created attachment 1210800 [details]
Add the /usr/bin/virtualenv-$MAJOR executables

Comment 2 Steve Milner 2016-10-17 15:02:43 UTC
Submitted https://bodhi.fedoraproject.org/updates/FEDORA-2016-5178e14a4c for testing.

Comment 3 Fedora Update System 2016-10-18 17:27:40 UTC
python-virtualenv-15.0.3-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5178e14a4c

Comment 4 Fedora Update System 2016-10-19 08:30:34 UTC
python-virtualenv-15.0.3-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-619f532328

Comment 5 Fedora Update System 2016-10-25 04:28:01 UTC
python-virtualenv-15.0.3-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2016-10-27 03:20:22 UTC
python-virtualenv-15.0.3-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Rolf Fokkens 2016-12-30 12:35:55 UTC
Noticed that the symlinks are createt/removed in %post/%postun sections. Wouldn't it be better to include them in the %files section?

Comment 8 Mathieu Bridon 2016-12-30 13:00:32 UTC
(In reply to Rolf Fokkens from comment #7)
> Noticed that the symlinks are createt/removed in %post/%postun sections.
> Wouldn't it be better to include them in the %files section?

I agree, and that's why the patch I had submitted was doing just that.

Doing the symlinks in %post/%postun scriptlets means RPM doesn't know about them:

    $ rpm -qf /usr/bin/virtualenv-3
    file /usr/bin/virtualenv-3 is not owned by any package

And in general, scriptlets are much more fragile than just installing files normally.