Bug 1324129 - python-pmw: Provide a Python 3 subpackage
Summary: python-pmw: Provide a Python 3 subpackage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pmw
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Fenn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
 
Reported: 2016-04-05 15:05 UTC by Tomas Orsava
Modified: 2016-07-05 08:25 UTC (History)
2 users (show)

Fixed In Version: python-pmw-2.0.0-1.fc24 python-pmw-2.0.0-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 04:59:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Orsava 2016-04-05 15:05:41 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 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

Comment 1 Dominika Krejčí 2016-05-04 13:17:47 UTC
Hello Tim,

Do you need any help adding Python 3 support to the RPM?

If you need more instructions, a [guide] for porting Python-based RPMs is available.

[guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html

Comment 2 Tim Fenn 2016-05-04 18:35:50 UTC
(In reply to Dominika Krejčí from comment #1)
> Hello Tim,
> 
> Do you need any help adding Python 3 support to the RPM?
> 
> If you need more instructions, a [guide] for porting Python-based RPMs is
> available.
> 
> [guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html

Sure - that would be great.  I'm in the process of trying to prepare an upgrade to the python-pmw package as well as incorporate these changes, but life is busy these days and I don't have much spare time!

Comment 3 Tomas Orsava 2016-05-05 17:22:24 UTC
That's great to hear Tim! We'll be looking forward to it, thank you for taking the time!

Comment 4 Tim Fenn 2016-06-25 18:59:07 UTC
Finally making some progress on this.  However, when I follow the guidelines I get the following error when building the package:

copying Pmw/Pmw_1_3_3/bin/bundlepmw.py -> build/lib/Pmw/Pmw_1_3_3/bin
+ %py3_build
/var/tmp/rpm-tmp.sy5yLN: line 34: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.sy5yLN (%build)


Any suggestions why this is?

current spec file:

https://sites.google.com/site/timfenn/python-pmw.spec

Comment 5 Fedora Update System 2016-06-26 00:37:49 UTC
python-pmw-2.0.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ae7950e83

Comment 6 Fedora Update System 2016-06-26 00:37:54 UTC
python-pmw-2.0.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8440b0a08e

Comment 7 Fedora Update System 2016-06-26 19:24:10 UTC
python-pmw-2.0.0-1.fc23 has been pushed to the Fedora 23 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-6ae7950e83

Comment 8 Fedora Update System 2016-06-26 19:26:08 UTC
python-pmw-2.0.0-1.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-8440b0a08e

Comment 9 Tomas Orsava 2016-06-27 09:29:33 UTC
Hi Tim!

Could you post the whole build log? It's hard to guess from the bit you copied.

Also, I tried building it on my own from the spec file you provided and I got the following error:

...
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/torsava/rpmbuild/BUILD/Pmw-2.0.0
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match.
find: 'debug': No such file or directory
+ '[' noarch = noarch ']'
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /home/torsava/rpmbuild/BUILDROOT/python-pmw-2.0.0-1.fc23.x86_64/usr/lib/python2.7 using /usr/bin/python2.7
Compiling /home/torsava/rpmbuild/BUILDROOT/python-pmw-2.0.0-1.fc23.x86_64/usr/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/demos/DemoVersion.py ...
  File "/usr/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/demos/DemoVersion.py", line 35
    print('No such Pmw version', repr(version) + '.', end=' ')


That is a Python 3 syntax that isn't compatible with Python 2, it shouldn't be in a Python 2 subpackage. (Notice the file path: `/usr/lib/python2.7`.)

Comment 10 Tim Fenn 2016-06-27 17:26:26 UTC
(In reply to Tomas Orsava from comment #9)
> Hi Tim!
> 
> Could you post the whole build log? It's hard to guess from the bit you
> copied.
> 
> Also, I tried building it on my own from the spec file you provided and I
> got the following error:
> 
> ...
> + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz
> --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000
> /home/torsava/rpmbuild/BUILD/Pmw-2.0.0
> /usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match.
> find: 'debug': No such file or directory
> + '[' noarch = noarch ']'
> + case "${QA_CHECK_RPATHS:-}" in
> + /usr/lib/rpm/check-buildroot
> + /usr/lib/rpm/brp-compress
> + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
> + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
> Bytecompiling .py files below
> /home/torsava/rpmbuild/BUILDROOT/python-pmw-2.0.0-1.fc23.x86_64/usr/lib/
> python2.7 using /usr/bin/python2.7
> Compiling
> /home/torsava/rpmbuild/BUILDROOT/python-pmw-2.0.0-1.fc23.x86_64/usr/lib/
> python2.7/site-packages/Pmw/Pmw_2_0_0/demos/DemoVersion.py ...
>   File
> "/usr/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/demos/DemoVersion.py", line
> 35
>     print('No such Pmw version', repr(version) + '.', end=' ')
> 
> 
> That is a Python 3 syntax that isn't compatible with Python 2, it shouldn't
> be in a Python 2 subpackage. (Notice the file path: `/usr/lib/python2.7`.)

Hi Tomas!

I figured out my problem (include python3-devel as a buildrequires), and was able to get a build that I *think* works appropriately now (I also had to separate out the bytecompiling for python2 and 3 modules independently to get at the issue you pointed out).  But feel free to take a look and let me know what you think:

http://koji.fedoraproject.org/koji/search?terms=python-pmw-2.0.0-1.fc24&type=build&match=glob

Comment 11 Tomas Orsava 2016-06-29 12:47:40 UTC
Hi again, Tim!

The build looks perfect, thank you for your great work!

Comment 12 Fedora Update System 2016-07-05 04:59:19 UTC
python-pmw-2.0.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-07-05 08:25:06 UTC
python-pmw-2.0.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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