Bug 180467 - [partial patch] Make devel/py-qt4-core work with python 3
Summary: [partial patch] Make devel/py-qt4-core work with python 3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on: 190847
Blocks: 185884
  Show dependency treegraph
 
Reported: 2013-07-11 15:00 UTC by Nathan Whitehorn
Modified: 2016-02-10 16:03 UTC (History)
0 users

See Also:


Attachments
file.diff (705 bytes, patch)
2013-07-11 15:00 UTC, Nathan Whitehorn
no flags Details | Diff
Updated Patch (4.16 KB, patch)
2014-06-08 14:52 UTC, Nathan Whitehorn
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Whitehorn freebsd_committer freebsd_triage 2013-07-11 15:00:00 UTC
To avoid errors compiling .pyc files, the py-qt4-core Makefile unconditionally deletes the uic/port_v3 directory. This unsurprisingly breaks the Python 3 build.

Fix: The attached patch instead picks the appropriate uic port directory instead of always picking the v2 one. Note that the package plist needs updating as well -- my minimal port skills are not good enough for handling plist updates.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-07-11 15:00:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-06-08 13:18:03 UTC
I've started taking a look at it; I've managed to get the plist to work with by passing PYTHON_MAJOR_VER to PLIST_SUB, but I'm currently blocked by PYTHON_PY3K_PLIST_HACK (to take __pycache__/ directories into account if Python>=3.2 is used) not considering @dirrmtry: https://phabric.freebsd.org/D191
Comment 3 Nathan Whitehorn freebsd_committer freebsd_triage 2014-06-08 14:52:18 UTC
Created attachment 143530 [details]
Updated Patch

This isn't a solution for the dirrmentry issue, but is in any case an updated version of the patch.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-06-21 14:06:27 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun 21 14:06:18 UTC 2014
New revision: 358702
URL: http://svnweb.freebsd.org/changeset/ports/358702

Log:
  Build with Python 3 as well.

  Instead of forcefully removing the pyuic/uic/port_v3/ directory, which in
  effect prevents the port from building with Python 3, check for the major
  Python version being used and selectively remove either port_v2/ or
  port_v3/.

  Additionally, set PYTHON_PY3K_PLIST_HACK, since PyQt does not use either
  distutils or setuptools, and Python >= 3.2 store .pyc/.pyo files in a
  different directory.

  PR:		180467
  Submitted by:	nwhitehorn@ (original version)
  MFH:		2014Q2

Changes:
  head/devel/py-qt4-core/Makefile
  head/devel/py-qt4-core/pkg-plist
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-06-21 14:07:07 UTC
This is finally fixed; sorry that it took so long!
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-06-21 16:50:39 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun 21 16:49:55 UTC 2014
New revision: 358718
URL: http://svnweb.freebsd.org/changeset/ports/358718

Log:
  MFH: r358702

  Build with Python 3 as well.

  Instead of forcefully removing the pyuic/uic/port_v3/ directory, which in
  effect prevents the port from building with Python 3, check for the major
  Python version being used and selectively remove either port_v2/ or
  port_v3/.

  Additionally, set PYTHON_PY3K_PLIST_HACK, since PyQt does not use either
  distutils or setuptools, and Python >= 3.2 store .pyc/.pyo files in a
  different directory.

  PR:		180467
  Submitted by:	nwhitehorn@ (original version)

  Approved by:	portmgr (erwin)

Changes:
_U  branches/2014Q2/
  branches/2014Q2/devel/py-qt4-core/Makefile
  branches/2014Q2/devel/py-qt4-core/pkg-plist