Bug 188150 - devel/py-sip: pkg-plist incompatible with Py3k
Summary: devel/py-sip: pkg-plist incompatible with Py3k
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:
Blocks:
 
Reported: 2014-04-01 00:00 UTC by John W. O'Brien
Modified: 2014-06-08 11:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2014-04-01 00:00:00 UTC
devel/py-sip/pkg-plist assumes pre-py3k bytecode caching scheme, so package target fails on missing files.

Build log excerpt:

=======================<phase: package        >============================
===>  Building package for py33-sip-4.15.2,1
pkg-static: lstat(/wrkdirs/usr/ports/devel/py-sip/work/stage/prefix/py33-sip-4.15.2_1/lib/python3.3/site-packages/sipconfig.pyc): No such file or directory
pkg-static: DEVELOPER_MODE: Plist error, missing file: lib/python3.3/site-packages/sipconfig.pyc
pkg-static: lstat(/wrkdirs/usr/ports/devel/py-sip/work/stage/prefix/py33-sip-4.15.2_1/lib/python3.3/site-packages/sipconfig.pyo): No such file or directory
pkg-static: DEVELOPER_MODE: Plist error, missing file: lib/python3.3/site-packages/sipconfig.pyo
pkg-static: lstat(/wrkdirs/usr/ports/devel/py-sip/work/stage/prefix/py33-sip-4.15.2_1/lib/python3.3/site-packages/sipdistutils.pyc): No such file or directory
pkg-static: DEVELOPER_MODE: Plist error, missing file: lib/python3.3/site-packages/sipdistutils.pyc
pkg-static: lstat(/wrkdirs/usr/ports/devel/py-sip/work/stage/prefix/py33-sip-4.15.2_1/lib/python3.3/site-packages/sipdistutils.pyo): No such file or directory
pkg-static: DEVELOPER_MODE: Plist error, missing file: lib/python3.3/site-packages/sipdistutils.pyo
*** [do-package] Error code 1

Full build log available at:

https://pkg.saltant.net/poudriere/bulk/92amd64-current-python33/2014-03-31_18h24m24s/logs/errors/py33-sip-4.15.2,1.log

Fix: 

Conceptual fix for this port:

    Check for Python versions that support PEP-3147 (3.2 and later) in the port Makefile. Convert *.pyo and *.pyc PLIST lines to new format. See astro/weather for rare example.


Conceptual general fix:

    Implement a USES=pycache (or similar) to post-process PLIST for use by those port that cannot use PYDISTUTILS_AUTOPLIST.
How-To-Repeat: Build and package devel/py-sip with "DEFAULT_VERSIONS= python=3.3" in make.conf.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-04-01 00:00:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 John W. O'Brien 2014-04-01 02:05:09 UTC
This is a multi-part message in MIME format.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-06-08 10:20:08 UTC
A commit references this bug:

Author: rakuco
Date: Sun Jun  8 10:19:26 UTC 2014
New revision: 357000
URL: http://svnweb.freebsd.org/changeset/ports/357000

Log:
  Set PYTHON_PY3K_PLIST_HACK to adjust the plist for Python >= 3.2.0.

  Since this port does not use distutils/setuptools and we manually generate
  the .pyc/.pyo files, we need to set PYTHON_PY3K_PLIST_HACK so that the cache
  files end up in the right directory if Python >= 3.2.0 is used due to
  PEP-3147.

  PR:		188150
  MFH:		2014Q2

Changes:
  head/devel/py-sip/Makefile
Comment 4 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-06-08 10:20:46 UTC
Fixed in r357000, thanks for the report!
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-06-08 11:10:11 UTC
A commit references this bug:

Author: rakuco
Date: Sun Jun  8 11:10:06 UTC 2014
New revision: 357002
URL: http://svnweb.freebsd.org/changeset/ports/357002

Log:
  MFH: r357000

  Set PYTHON_PY3K_PLIST_HACK to adjust the plist for Python >= 3.2.0.

  Since this port does not use distutils/setuptools and we manually generate
  the .pyc/.pyo files, we need to set PYTHON_PY3K_PLIST_HACK so that the cache
  files end up in the right directory if Python >= 3.2.0 is used due to
  PEP-3147.

  PR:		188150

  Approved by:	portmgr (miwi)

Changes:
_U  branches/2014Q2/
  branches/2014Q2/devel/py-sip/Makefile