Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1361768 - python-django-pyscss: Provide a Python 3 subpackage
Summary: python-django-pyscss: Provide a Python 3 subpackage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-django-pyscss
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
TreeView+ depends on / blocked
 
Reported: 2016-07-30 09:04 UTC by Petr Viktorin
Modified: 2016-08-30 12:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-30 12:16:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Spec file patch to provide Python 3 subpackage (3.65 KB, patch)
2016-07-31 17:23 UTC, Jan Beran
no flags Details | Diff
Updated spec file (3.65 KB, patch)
2016-07-31 17:38 UTC, Jan Beran
no flags Details | Diff
Updated spec file (3.80 KB, patch)
2016-08-03 14:42 UTC, Jan Beran
no flags Details | Diff

Description Petr Viktorin 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!


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