NetBSD Problem Report #44826
From www@NetBSD.org Tue Apr 5 09:53:57 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 515A663C19C
for <gnats-bugs@gnats.NetBSD.org>; Tue, 5 Apr 2011 09:53:57 +0000 (UTC)
Message-Id: <20110405095355.723E463C173@www.NetBSD.org>
Date: Tue, 5 Apr 2011 09:53:55 +0000 (UTC)
From: him@online.de
Reply-To: him@online.de
To: gnats-bugs@NetBSD.org
Subject: packages for python stdlib modules should not install to site-packages
X-Send-Pr-Version: www-1.0
>Number: 44826
>Category: pkg
>Synopsis: packages for python stdlib modules should not install to site-packages
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Apr 05 09:55:00 +0000 2011
>Closed-Date: Thu Jun 23 08:35:11 +0000 2011
>Last-Modified: Thu Jun 23 08:35:11 +0000 2011
>Originator: Joachim König
>Release: 5.99.44
>Organization:
>Environment:
NetBSD fujitsu-netbsd 5.99.44 NetBSD 5.99.44 (JOACHIM_ACPI) #0: Thu Jan 20 08:49:04 CET 2011 joachim@joachim:/.../src/sys/arch/i386/compile/JOACHIM_ACPI i386
>Description:
The following python stdlib modules are created separately, i.e. with
extra packages, and not during python build and install:
databases/py-gdbm
databases/py-sqlite3
devel/py-curses
devel/py-cursespanel
devel/py-readline
textproc/py-cElementTree
textproc/py-expat
x11/py-Tk
These modules are installed by a custom setup.py (located in the files subdirectory) that uses distutils support to build and install the module. Distutils however installs modules by default into the location for third party modules, lib/pythonX.Y/site-packages.
stdlib modules should however be placed into lib/pythonX.Y. This is normally not an issues because the python interpreter searches in both
locations, it is however a problem for software using virtual environments that try to isolate the python interpreter and third
party modules in order to avoid version conflicts of the same module
for different third party packages.
>How-To-Repeat:
One such package is Plone Version 4 and its unified installer which
does not find the expat parser (from textproc/py-expat) when installed
for using the pkgsrc python interpreter. There is a bug report at
plone.org:
http://dev.plone.org/plone/ticket/10892
Installing pyexpat.so to lib/python2.6 instead of lib/python2.6/site-packages solves the problem.
>Fix:
In all the Makefiles of the above mentioned packages add the following
line:
PYSETUPINSTALLARGS= --install-lib ${PREFIX}/${PYLIB}
and replace ${PYSITELIB} by ${PYLIB} in the PLIST files.
Unfortunately, PYLIB is not yet replaced in PLIST files, though
PRINT_PLIST_AWK already supports it. So to make it work change
the line in lang/python/extension.mk from:
PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
to
PLIST_SUBST+= PYINC=${PYINC} PYLIB=${PYLIB} PYSITELIB=${PYSITELIB}
and of course: bump PKGREVISION
>Release-Note:
>Audit-Trail:
From: Carl Brewer <carl@bl.echidna.id.au>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/44826
Date: Fri, 08 Apr 2011 08:16:14 +1000
This is a bit of a showstopper for me, is there any chance it can get
worked on by someone with commit to pkgsrc?
Thanks!
Carl
(trying to run recent versions of Plone on NetBSD is ... tricky ...)
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/44826: packages for python stdlib modules should not install
to site-packages
Date: Thu, 28 Apr 2011 17:22:35 +0900
On Tue, 05 Apr 2011 18:55:00 +0900, <him@online.de> wrote:
> Installing pyexpat.so to lib/python2.6 instead of lib/python2.6/site-packages solves the problem.
Usually, it should be in lib/python2.6/lib-dynload.
Is it really required to be in lib/python2.6 for plone-4?
From: =?ISO-8859-15?Q?Joachim_K=F6nig?= <him@online.de>
To: gnats-bugs@NetBSD.org
Cc: OBATA Akio <obache@netbsd.org>
Subject: Re: pkg/44826: packages for python stdlib modules should not install
to site-packages
Date: Wed, 04 May 2011 10:31:20 +0200
On 28/04/2011 10:25, OBATA Akio wrote:
> Usually, it should be in lib/python2.6/lib-dynload.
> Is it really required to be in lib/python2.6 for plone-4
No, you're right, it should be in lib/python2.6/lib-dynload. So the fix
should
be as folllows:
In all the Makefiles of the above mentioned packages add the following
line:
PYSETUPINSTALLARGS= --install-lib ${PREFIX}/${PYLIB}/lib-dynload
and replace ${PYSITELIB} by ${PYLIB}/lib-dynload in the PLIST files.
Unfortunately, PYLIB is not yet replaced in PLIST files, though
PRINT_PLIST_AWK already supports it. So to make it work change
the line in lang/python/extension.mk from:
PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
to
PLIST_SUBST+= PYINC=${PYINC} PYLIB=${PYLIB} PYSITELIB=${PYSITELIB}
and of course: bump PKGREVISION
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44826 CVS commit: pkgsrc/lang/python
Date: Wed, 4 May 2011 10:01:02 +0000
Module Name: pkgsrc
Committed By: obache
Date: Wed May 4 10:01:02 UTC 2011
Modified Files:
pkgsrc/lang/python: extension.mk
Log Message:
also put PYLIB in PLIST_SUBST, a part of PR#44826.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/lang/python/extension.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44826 CVS commit: pkgsrc
Date: Wed, 4 May 2011 11:38:06 +0000
Module Name: pkgsrc
Committed By: obache
Date: Wed May 4 11:38:06 UTC 2011
Modified Files:
pkgsrc/databases/py-gdbm: Makefile PLIST
pkgsrc/databases/py-sqlite3: Makefile PLIST
pkgsrc/devel/py-curses: Makefile PLIST
pkgsrc/devel/py-cursespanel: Makefile PLIST
pkgsrc/devel/py-readline: Makefile PLIST
pkgsrc/textproc/py-cElementTree: Makefile PLIST
pkgsrc/textproc/py-expat: Makefile PLIST
pkgsrc/x11/py-Tk: Makefile PLIST
Log Message:
Install standard python modules into usual location instead of site-packages.
PR#44826.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/databases/py-gdbm/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/databases/py-gdbm/PLIST
cvs rdiff -u -r1.4 -r1.5 pkgsrc/databases/py-sqlite3/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/databases/py-sqlite3/PLIST
cvs rdiff -u -r1.34 -r1.35 pkgsrc/devel/py-curses/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-curses/PLIST
cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/py-cursespanel/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/devel/py-cursespanel/PLIST
cvs rdiff -u -r1.19 -r1.20 pkgsrc/devel/py-readline/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/py-readline/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/py-cElementTree/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/textproc/py-cElementTree/PLIST
cvs rdiff -u -r1.14 -r1.15 pkgsrc/textproc/py-expat/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/py-expat/PLIST
cvs rdiff -u -r1.44 -r1.45 pkgsrc/x11/py-Tk/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/py-Tk/PLIST
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: obache@NetBSD.org
State-Changed-When: Wed, 04 May 2011 11:41:59 +0000
State-Changed-Why:
fixed?
State-Changed-From-To: feedback->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Thu, 23 Jun 2011 08:35:11 +0000
State-Changed-Why:
no negative feedback.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.