Bug 1361768

Summary: python-django-pyscss: Provide a Python 3 subpackage
Product: [Fedora] Fedora Reporter: Petr Viktorin (pviktori) <pviktori>
Component: python-django-pyscssAssignee: Matthias Runge <mrunge>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jberan, lbalhar, mrunge, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-30 12:16:48 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: 1285816, 1312032    
Attachments:
Description Flags
Spec file patch to provide Python 3 subpackage
none
Updated spec file
none
Updated spec file none

Description Petr Viktorin (pviktori) 2016-07-30 09:04:03 UTC
Upstream, this software supports Python 3. Please provide a Python 3
package for Fedora.


According to the Python packaging guidelines [0], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [1].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3
entirely.

It's OK to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 24 as well.


If you need more instructions, a guide for porting Python-based RPMs is
available at [2].
If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


[0] https://fedoraproject.org/wiki/Packaging:Python
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
[2] http://python-rpm-porting.readthedocs.io/

Comment 1 Jan Beran 2016-07-31 17:23:15 UTC
Created attachment 1186155 [details]
Spec file patch to provide Python 3 subpackage

Comment 2 Jan Beran 2016-07-31 17:38:45 UTC
Created attachment 1186156 [details]
Updated spec file

Changelog correction

Comment 3 Jan Beran 2016-08-03 14:42:28 UTC
Created attachment 1187101 [details]
Updated spec file

Hi Tomáš,

may I ask you to review the updated spec file patch which I have adjusted according to the request of Matthias (bug #1311552)?

Thank you.

Comment 4 Tomas Orsava 2016-08-05 12:59:07 UTC
Hi Jan!

The patch looks great, there's just one tiny detail:

In the original spec file, in the %prep section there's the following:

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

That's usually a good idea, because the .egg-info gets generated anew during the build. Therefore I suggest leaving this line in the spec file.

Apart from that, everything looks superb!

Comment 5 Jan Beran 2016-08-05 13:54:32 UTC
Hi Tomáš,

thanks for your review.

As I understand from the recommendation of Matthias (bug #1311552), if %autosetup replaces %setup then "rm -rf %{pypi_name}.egg-info" command is not required any more.

Comment 6 Tomas Orsava 2016-08-05 16:18:46 UTC
Oh, I did not know that, my apologies!

In that case, the patch looks good to me!

Comment 7 Matthias Runge 2016-08-08 06:17:41 UTC
Jan, Tomas,

%autosetup replaces %setup. I don't remember the reasons.

Removing the upstream provided egg-info is discouraged anyways. That was a change around 2 years ago, driven by kchamart, but neither he nor me remember the the reasons for that anymore. The recommendation to remove egg-info has been removed from python packaging guidelines then.

Comment 8 Matthias Runge 2016-08-08 07:26:19 UTC
Difference between %setup and %autosetup is, that autosetup applies patches listed in %patch???.

Comment 9 Lumír Balhar 2016-08-15 10:56:20 UTC
Hello Matthias.

Yes, differences between %setup and %autosetup are:
- %autosetup applies patches (Patch0, Patch1 ...) automatically
- %autosetup has option -q (quiet) enabled by default

Comment 10 Lumír Balhar 2016-08-30 06:49:27 UTC
If maintainer has nothing against, we can push this reviewed patch after a week.

Comment 11 Matthias Runge 2016-08-30 11:13:38 UTC
(In reply to Lumír Balhar from comment #10)
> If maintainer has nothing against, we can push this reviewed patch after a
> week.

Which patch are you speaking of? The last patch is marked obsolete here.

Comment 12 Tomas Orsava 2016-08-30 11:36:38 UTC
(In reply to Matthias Runge from comment #11)
> (In reply to Lumír Balhar from comment #10)
> > If maintainer has nothing against, we can push this reviewed patch after a
> > week.
> 
> Which patch are you speaking of? The last patch is marked obsolete here.

I believe you are mistaken, the last patch [0] is not obsoleted.

[0] https://bugzilla.redhat.com/attachment.cgi?id=1187101

Comment 13 Matthias Runge 2016-08-30 12:16:48 UTC
committed the patch and fixed the build afterwards,

mrunge's python-django-pyscss-2.0.2-4.fc26 completed http://koji.fedoraproject.org/koji/buildinfo?buildID=795604

Thanks!