Hi,
I have doubts about https://fedoraproject.org/wiki/Packaging:Python
"For other executables, the general rule is:
If only one executable is to be shipped, then it owns its own slot and should use /usr/bin/python3 from Fedora 22 on."
The problem is discussed here
https://bugzilla.redhat.com/show_bug.cgi?id=1430020
Please note that I prefer to keep the same spec file for Fedora and EPEL, otherwise it's too much burden maintaining it. I need help for correcting the spec so it complies with the guidelines, and makes sense for the users of the package.
Thanks
Marcin
"MD" == Marcin Dulak marcin.dulak@gmail.com writes:
MD> Hi, I have doubts about MD> https://fedoraproject.org/wiki/Packaging:Python
MD> "For other executables, the general rule is:
MD> If only one executable is to be shipped, then it owns its own slot MD> and should use /usr/bin/python3 from Fedora 22 on."
What's the doubt you have? The guideline seems clear, though I have never been happy with that wording.
MD> Please note that I prefer to keep the same spec file for Fedora and MD> EPEL, otherwise it's too much burden maintaining it.
Depending on how extensive your dependencies are, you might just be able to use the EPEL python3 packages. (Even EPEL6 has them.) That's probably the easiest way, but at some point you have to accept that you are trying to keep the same spec across what are rather different operating systems at this point. You can do anything with conditionals, of course, to the point if just having two completely different specs crammed into one file. I don't see how that's any more maintainable than just having separate, but everyone likes their own thing.
- J<
MD> Hi, I have doubts about MD> https://fedoraproject.org/wiki/Packaging:Python
MD> "For other executables, the general rule is:
MD> If only one executable is to be shipped, then it owns its own slot MD> and should use /usr/bin/python3 from Fedora 22 on."
What's the doubt you have? The guideline seems clear, though I have never been happy with that wording.
my doubt is: if I only provide python3 scripts and user installs python2-idstools then he obtains a non-functional program - the scripts are absent. In order to correct this should I introduce a Requires of the python2 package on the python3 one?
%if 0%{?with_python3} Requires: python%{python3_pkgversion}-%{pname} %endif
MD> Please note that I prefer to keep the same spec file for Fedora and MD> EPEL, otherwise it's too much burden maintaining it.
Depending on how extensive your dependencies are, you might just be able to use the EPEL python3 packages. (Even EPEL6 has them.) That's probably the easiest way, but at some point you have to accept that you are trying to keep the same spec across what are rather different operating systems at this point. You can do anything with conditionals, of course, to the point if just having two completely different specs crammed into one file. I don't see how that's any more maintainable than just having separate, but everyone likes their own thing.
- J<
If, for functionality reasons, you would prefer to ship the binaries with both packages you can find some information here on how to do that:
http://python-rpm-porting.readthedocs.io/en/latest/tools.html#moving-the-exe...
Regards,
Charalampos Stratakis Associate Software Engineer Python Maintenance Team, Red Hat
----- Original Message ----- From: "Marcin Dulak" marcin.dulak@gmail.com To: packaging@lists.fedoraproject.org Sent: Tuesday, March 7, 2017 10:26:30 PM Subject: [Fedora-packaging] Re: Clarification of python packaging guidelines
MD> Hi, I have doubts about MD> https://fedoraproject.org/wiki/Packaging:Python
MD> "For other executables, the general rule is:
MD> If only one executable is to be shipped, then it owns its own slot MD> and should use /usr/bin/python3 from Fedora 22 on."
What's the doubt you have? The guideline seems clear, though I have never been happy with that wording.
my doubt is: if I only provide python3 scripts and user installs python2-idstools then he obtains a non-functional program - the scripts are absent. In order to correct this should I introduce a Requires of the python2 package on the python3 one?
%if 0%{?with_python3} Requires: python%{python3_pkgversion}-%{pname} %endif
MD> Please note that I prefer to keep the same spec file for Fedora and MD> EPEL, otherwise it's too much burden maintaining it.
Depending on how extensive your dependencies are, you might just be able to use the EPEL python3 packages. (Even EPEL6 has them.) That's probably the easiest way, but at some point you have to accept that you are trying to keep the same spec across what are rather different operating systems at this point. You can do anything with conditionals, of course, to the point if just having two completely different specs crammed into one file. I don't see how that's any more maintainable than just having separate, but everyone likes their own thing.
- J<
_______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On 03/07/2017 10:16 AM, Marcin Dulak wrote:
Hi,
I have doubts about https://fedoraproject.org/wiki/Packaging:Python
"For other executables, the general rule is:
If only one executable is to be shipped, then it owns its own slot and should use /usr/bin/python3 from Fedora 22 on."
The problem is discussed here
https://bugzilla.redhat.com/show_bug.cgi?id=1430020
Please note that I prefer to keep the same spec file for Fedora and EPEL, otherwise it's too much burden maintaining it. I need help for correcting the spec so it complies with the guidelines, and makes sense for the users of the package.
My $0.02:
- I would suggest shipping the /usr/bin scripts in an 'idstools' sub-package that requires the appropriate python?-idstools package.
- Since EL7 predates Fedora 22, python2 is considered the default python there and the idstool scripts should be using the python2 version.
On Thu, Mar 9, 2017 at 12:39 AM, Orion Poplawski orion@cora.nwra.com wrote:
On 03/07/2017 10:16 AM, Marcin Dulak wrote:
Hi,
I have doubts about https://fedoraproject.org/wiki/Packaging:Python
"For other executables, the general rule is:
If only one executable is to be shipped, then it owns its own slot and
should use /usr/bin/python3 from Fedora 22 on."
The problem is discussed here
https://bugzilla.redhat.com/show_bug.cgi?id=1430020
Please note that I prefer to keep the same spec file for Fedora and
EPEL, otherwise it's too much burden maintaining it.
I need help for correcting the spec so it complies with the guidelines,
and makes sense for the users of the package.
My $0.02:
- I would suggest shipping the /usr/bin scripts in an 'idstools'
sub-package that requires the appropriate python?-idstools package.
but the scripts contain different shebangs depending on the python version, so the sub-package cannot be really named independently of the python version.
For now I went with the standard way of providing all those script-2.X, script-2, script-3.X, script-3, script in the appropriate packages.
- Since EL7 predates Fedora 22, python2 is considered the default python
there and the idstool scripts should be using the python2 version.
Marcin
-- Orion Poplawski Technical Manager 720-772-5637 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane orion@nwra.com Boulder, CO 80301 http://www.nwra.com _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On 9.3.2017 01:53, Marcin Dulak wrote:
On Thu, Mar 9, 2017 at 12:39 AM, Orion Poplawski <orion@cora.nwra.com mailto:orion@cora.nwra.com> wrote:
On 03/07/2017 10:16 AM, Marcin Dulak wrote: > Hi, > > I have doubts about https://fedoraproject.org/wiki/Packaging:Python <https://fedoraproject.org/wiki/Packaging:Python> > > "For other executables, the general rule is: > > If only one executable is to be shipped, then it owns its own slot and should use /usr/bin/python3 from Fedora 22 on." > > The problem is discussed here > > https://bugzilla.redhat.com/show_bug.cgi?id=1430020 <https://bugzilla.redhat.com/show_bug.cgi?id=1430020> > > Please note that I prefer to keep the same spec file for Fedora and EPEL, otherwise it's too much burden maintaining it. > I need help for correcting the spec so it complies with the guidelines, and makes sense for the users of the package. My $0.02: - I would suggest shipping the /usr/bin scripts in an 'idstools' sub-package that requires the appropriate python?-idstools package.
but the scripts contain different shebangs depending on the python version, so the sub-package cannot be really named independently of the python version.
For now I went with the standard way of providing all those script-2.X, script-2, script-3.X, script-3, script in the appropriate packages.
If the executables provide the same functionality on both Python versions, you SHOULD not do this.
- Since EL7 predates Fedora 22, python2 is considered the default python there and the idstool scripts should be using the python2 version.
Marcin
-- Orion Poplawski Technical Manager 720-772-5637 <tel:720-772-5637> NWRA, Boulder/CoRA Office FAX: 303-415-9702 <tel:303-415-9702> 3380 Mitchell Lane orion@nwra.com <mailto:orion@nwra.com> Boulder, CO 80301 http://www.nwra.com _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org>
packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On Fri, Mar 17, 2017 at 2:02 PM, Miro Hrončok mhroncok@redhat.com wrote:
On 9.3.2017 01:53, Marcin Dulak wrote:
On Thu, Mar 9, 2017 at 12:39 AM, Orion Poplawski <orion@cora.nwra.com mailto:orion@cora.nwra.com> wrote:
On 03/07/2017 10:16 AM, Marcin Dulak wrote: > Hi, > > I have doubts about https://fedoraproject.org/wiki/Packaging:Python <https://fedoraproject.org/wiki/Packaging:Python> > > "For other executables, the general rule is: > > If only one executable is to be shipped, then it owns its own slot
and should use /usr/bin/python3 from Fedora 22 on." > > The problem is discussed here > > https://bugzilla.redhat.com/show_bug.cgi?id=1430020 https://bugzilla.redhat.com/show_bug.cgi?id=1430020 > > Please note that I prefer to keep the same spec file for Fedora and EPEL, otherwise it's too much burden maintaining it. > I need help for correcting the spec so it complies with the guidelines, and makes sense for the users of the package.
My $0.02: - I would suggest shipping the /usr/bin scripts in an 'idstools' sub-package that requires the appropriate python?-idstools package.
but the scripts contain different shebangs depending on the python version, so the sub-package cannot be really named independently of the python version.
For now I went with the standard way of providing all those script-2.X, script-2, script-3.X, script-3, script in the appropriate packages.
If the executables provide the same functionality on both Python versions, you SHOULD not do this.
then how can I make the executables (scripts) available for both python2 and python3? The script differ only in the shebang line.
Marcin
- Since EL7 predates Fedora 22, python2 is considered the default python there and the idstool scripts should be using the python2 version.
Marcin
-- Orion Poplawski Technical Manager 720-772-5637 <tel:720-772-5637> NWRA, Boulder/CoRA Office FAX: 303-415-9702 <tel:303-415-9702> 3380 Mitchell Lane orion@nwra.com <mailto:orion@nwra.com> Boulder, CO 80301 http://www.nwra.com _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org>
packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
-- Miro Hrončok -- Phone: +420777974800 IRC: mhroncok
packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
On 03/17/2017 02:22 PM, Marcin Dulak wrote:
On Fri, Mar 17, 2017 at 2:02 PM, Miro Hrončok <mhroncok@redhat.com mailto:mhroncok@redhat.com> wrote:
On 9.3.2017 01:53, Marcin Dulak wrote: On Thu, Mar 9, 2017 at 12:39 AM, Orion Poplawski <orion@cora.nwra.com <mailto:orion@cora.nwra.com> <mailto:orion@cora.nwra.com <mailto:orion@cora.nwra.com>>> wrote: On 03/07/2017 10:16 AM, Marcin Dulak wrote: > Hi, > > I have doubts about https://fedoraproject.org/wiki/Packaging:Python <https://fedoraproject.org/wiki/Packaging:Python> <https://fedoraproject.org/wiki/Packaging:Python <https://fedoraproject.org/wiki/Packaging:Python>> > > "For other executables, the general rule is: > > If only one executable is to be shipped, then it owns its own slot and should use /usr/bin/python3 from Fedora 22 on." > > The problem is discussed here > > https://bugzilla.redhat.com/show_bug.cgi?id=1430020 <https://bugzilla.redhat.com/show_bug.cgi?id=1430020> <https://bugzilla.redhat.com/show_bug.cgi?id=1430020 <https://bugzilla.redhat.com/show_bug.cgi?id=1430020>> > > Please note that I prefer to keep the same spec file for Fedora and EPEL, otherwise it's too much burden maintaining it. > I need help for correcting the spec so it complies with the guidelines, and makes sense for the users of the package. My $0.02: - I would suggest shipping the /usr/bin scripts in an 'idstools' sub-package that requires the appropriate python?-idstools package. but the scripts contain different shebangs depending on the python version, so the sub-package cannot be really named independently of the python version. For now I went with the standard way of providing all those script-2.X, script-2, script-3.X, script-3, script in the appropriate packages. If the executables provide the same functionality on both Python versions, you SHOULD not do this.
then how can I make the executables (scripts) available for both python2 and python3? The script differ only in the shebang line.
Marcin
Executables are located in /usr/bin/ and are only intended to be run as programs, not imported into Python. And if both Python 2 and 3 versions of the executable have the same behavior, then you don't need to make the executables available for both Python 2 and 3, only the Python 3 version will suffice.
Tomas
- Since EL7 predates Fedora 22, python2 is considered the default python there and the idstool scripts should be using the python2 version. Marcin -- Orion Poplawski Technical Manager 720-772-5637 <tel:720-772-5637> <tel:720-772-5637 <tel:720-772-5637>> NWRA, Boulder/CoRA Office FAX: 303-415-9702 <tel:303-415-9702> <tel:303-415-9702 <tel:303-415-9702>> 3380 Mitchell Lane orion@nwra.com <mailto:orion@nwra.com> <mailto:orion@nwra.com <mailto:orion@nwra.com>> Boulder, CO 80301 http://www.nwra.com _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org> <mailto:packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org>> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org> <mailto:packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org>> _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org> -- Miro Hrončok -- Phone: +420777974800 <tel:%2B420777974800> IRC: mhroncok _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org <mailto:packaging@lists.fedoraproject.org> To unsubscribe send an email to packaging-leave@lists.fedoraproject.org <mailto:packaging-leave@lists.fedoraproject.org>
packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org
packaging@lists.fedoraproject.org