From owner-freebsd-python@FreeBSD.ORG  Thu Feb 28 01:27:23 2013
Return-Path: <owner-freebsd-python@FreeBSD.ORG>
Delivered-To: python@freebsd.org
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 0D9877C2
 for <python@freebsd.org>; Thu, 28 Feb 2013 01:27:23 +0000 (UTC)
 (envelope-from john@saltant.com)
Received: from homiemail-a33.g.dreamhost.com (caiajhbdcaib.dreamhost.com
 [208.97.132.81]) by mx1.freebsd.org (Postfix) with ESMTP id DE7D7F8C
 for <python@freebsd.org>; Thu, 28 Feb 2013 01:27:22 +0000 (UTC)
Received: from homiemail-a33.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a33.g.dreamhost.com (Postfix) with ESMTP id AB76B594061;
 Wed, 27 Feb 2013 17:27:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=saltant.com; h=message-id
 :date:from:mime-version:to:cc:subject:references:in-reply-to
 :content-type:content-transfer-encoding; s=saltant.com; bh=XxyYL
 lwj9V8t/stfVkxuH35lly8=; b=ACE8JPNoffSFIOuU4tWpvXw3T/8/BJp50Z2Mw
 peZ3c/NJvkfRsikikqFCm9Ckxd6FeCWtEmWMOHztdqI5NxgKR05+p5b6NzbtDxGT
 ixSo9Yu/i4N9HyGnISMiOOpyjNU0KRBjevl6OnhB38V/qIjh4y3RL5IQr9yRj4V/
 2QqaMI=
Received: from imago.y.saltant.net (vice.saltant.net [96.227.187.16])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: john@saltant.com)
 by homiemail-a33.g.dreamhost.com (Postfix) with ESMTPSA id 4B6BA594059;
 Wed, 27 Feb 2013 17:27:15 -0800 (PST)
Message-ID: <512EB272.1090503@saltant.com>
Date: Wed, 27 Feb 2013 20:27:14 -0500
From: "John W. O'Brien" <john@saltant.com>
Organization: Saltant Solutions
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: Eitan Adler <lists@eitanadler.com>
Subject: Re: Advice using an origin prefix when PKGNAMEPREIX is set.
References: <CAF6rxgnWiHYzgSvK7GyoiAyLH6=LOEK8RHpA61y0rs7UuaUbBw@mail.gmail.com>
In-Reply-To: <CAF6rxgnWiHYzgSvK7GyoiAyLH6=LOEK8RHpA61y0rs7UuaUbBw@mail.gmail.com>
X-Enigmail-Version: 1.4.6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: python <python@freebsd.org>
X-BeenThere: freebsd-python@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-python>
List-Post: <mailto:freebsd-python@freebsd.org>
List-Help: <mailto:freebsd-python-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Feb 2013 01:27:23 -0000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/27/2013 05:09 PM, Eitan Adler wrote:
> Can anyone on this list please review the following. I am not certain
> it is good advice.
>
> diff --git a/en_US.ISO8859-1/books/porters-handbook/book.xml
> b/en_US.ISO8859-1/books/porters-handbook/book.xml
> index 0f7d8c6..423bd80 100644
> --- a/en_US.ISO8859-1/books/porters-handbook/book.xml
> +++ b/en_US.ISO8859-1/books/porters-handbook/book.xml
> @@ -7603,6 +7603,11 @@ _DOCSDIR= .
>
> <programlisting>PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}</programlisting>
>
> + <para>Generally, if <makevar>PKGNAMEPREFIX</makevar> is set, the
> + port requires a <literal>py-</literal> origin prefix:
> + For example,
> +
<filename><replaceable>sysutils/py-myport</replaceable></filename></para>
> +
> <table frame="none">
> <title>Most Useful Variables for Ports That Use Python</title>
>

The preceding paragraph already states the really important bit.

"Ports that install files under PYTHON_SITELIBDIR should use the pyXY-
package name prefix, so their package name embeds the version of Python
they are installed into."

In principle, this allows the user to maintain two or more concurrent
versions of Python, and install a given port for each one. If the
versioned PKGNAMEPREFIX is omitted, then concurrent installs of the port
don't work.

So, does the use of PKGNAMEPREFIX generally require "py-" in the origin?
No. What undesirable thing happens if I use the former, but omit the
latter? Nothing, as far as I know. It's certainly a convention, and, I
think most would agree, a useful one, but we should crispy distinguish a
requirement ("Do this!") from a best practice ("Most people do this.").

How many ports use PKGNAMEPREFIX, but aren't named $CATEGORY/py-$PORT?

% find /usr/ports -depth 2 -name "py-*" -prune -o -depth 3 -type f -name
Makefile \
| xargs egrep "^PKGNAMEPREFIX=.*PYTHON_PKGNAMEPREFIX" -l \
| wc -l
      51

How many ports are named $CATEGORY/py-$PORT, but don't use PKGNAMEPREFIX?

% find /usr/ports -path "*/py-*" -name Makefile \
| xargs egrep "^PKGNAMEPREFIX=.*PYTHON_PKGNAMEPREFIX" -L \
| wc -l
      30

Is this OK? Yes, it is.

Regards,
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRLrJxAAoJEEdKvTwaez9wAJUIAMfQrL6VV7Px760Nre6v5WJo
vUN1tA9+5wHylNNLsO2miM0MCOBxgym3RhF+maQ5T00dLaunrgIDjJVvOWE42SzI
cIUgETxIcqMlyHaE1yWzzLihxxYruo1IMQvaOvbjCg3euCoPeK3XXA4D7Ro9V647
ZtYfP3KKOtgcHlVAp1oWcD2A402nu1rJeHDyN4ezr5Jae+FdCwvwWgZZyT3Pc0og
MwFgcWGhPkODMwTBqOfAiN3qjWX65FBFus2y6h6i4NIdNQ+gr3VXKuOYcwDQS8tB
iDzAjZ9MN7312vlm7zXny4V0j3z3MZYMr0Y+NCfBjk8ZYns7/6qDxaMp8TR7gPg=
=fpt8
-----END PGP SIGNATURE-----