From owner-freebsd-ports@FreeBSD.ORG Sat Jul 6 23:20:58 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AF054B7B; Sat, 6 Jul 2013 23:20:58 +0000 (UTC) (envelope-from lifanov@mail.lifanov.com) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) by mx1.freebsd.org (Postfix) with ESMTP id 9CC871963; Sat, 6 Jul 2013 23:20:58 +0000 (UTC) Received: from app.lifanov.com (chat.lifanov.com [206.125.175.13]) by mail.lifanov.com (Postfix) with ESMTPA id 6067C19E006; Sat, 6 Jul 2013 23:20:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 06 Jul 2013 19:20:58 -0400 From: Nikolai Lifanov To: Bryan Drewery Subject: Re: =?UTF-8?Q?=25=25PYTHON=5FSITELIBDIR=25=25=20in=20pkg-plist?= In-Reply-To: <51D83DB9.9050504@FreeBSD.org> References: <51D83B22.5010307@FreeBSD.org> <51D83DB9.9050504@FreeBSD.org> Message-ID: X-Sender: lifanov@mail.lifanov.com User-Agent: Roundcube Webmail/0.9.2 Cc: python@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 23:20:58 -0000 On 2013-07-06 11:54, Bryan Drewery wrote: > On 7/6/2013 10:43 AM, Kubilay Kocak wrote: >> On 7/07/2013 12:51 AM, Nikolai Lifanov wrote: >>> Hello. >>> >>> I maintain sysutils/ansible, and I keep wanting to @dirrmtry >>> %%PYTHON_SITELIBDIR%% and perhaps %%PYTHON_LIBDIR%%. >>> portlint tells me that this is a wrong thing to do, while poudriere >>> testport complains about leftover directories. >>> >>> What is the correct thing to do with these? >>> >>> - Nikolai Lifanov >>> >>> _______________________________________________ >>> freebsd-ports@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >>> To unsubscribe, send any mail to >>> "freebsd-ports-unsubscribe@freebsd.org" >> >> The following are 'normal'leftover entries when testing python ports, >> and can safely be ignored: >> >> %%PYTHON_LIBDIR%%/site-packages/easy-install.pth >> %%PYTHON_LIBDIR%%/site-packages/site.py >> %%PYTHON_LIBDIR%%/site-packages/site.pyc >> %%PYTHON_LIBDIR%%/site-packages/site.pyo >> @dirrm %%PYTHON_LIBDIR%%/site-packages >> @dirrm %%PYTHON_LIBDIR%% >> >> The above output is from poudriere, and >> %%PYTHON_LIBDIR%%/site-packages/ >> is actually %%PYTHON_SITELIBDIR%%. Here, poudriere is just making a >> first-variable-from-the-list-wins guess. >> >> If you see porttools `port test` output, you'll note it displays >> %%PYTHON_SITELIBDIR%% as the leftover prefix. They can be ignored as >> well. >> >> Hope that helps :) >> > > The problem is just that the port (and python ports) do not respect > PREFIX when it does not equal LOCALBASE. By default, 'poudriere > testport' uses a custom PREFIX. In general, ports should pass leftover > tests by default. If they use ports framework support that does not > respect PREFIX, try using -n as well, which will stick to > PREFIX=LOCALBASE. In this case, using -n passes the test with testport > on ansible. Hmm... This works and makes sense, since python sys.prefix is set depending on its location. I might be naive here, but what would be the effect of depending on virtualenv magic if PREFIX != LOCALBASE? This way a package can ask for dependencies with the same PREFIX if they would otherwise exist somewhere else during a single make, and it shouldn't conflict with anything else. This can go into a package name (py27-non_localbase_prefix_with_encoded_slashes-mypackage) or, after pkg_* tools are out, a pkgng annotation? For example, if py27-foo depends on py27-bar, py27-opt_baz-foo would depend on py27-opt_baz-bar without conflicting. - Nikolai Lifanov