From owner-freebsd-python@FreeBSD.ORG Tue Mar 31 20:00:23 2015 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46E427B3; Tue, 31 Mar 2015 20:00:23 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE61ED4F; Tue, 31 Mar 2015 20:00:22 +0000 (UTC) Received: by wgbdm7 with SMTP id dm7so31326681wgb.1; Tue, 31 Mar 2015 13:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=TcI9ay4/j8XOJgpjLOfNSViIIdYfVDzlg+8jY7HI3AU=; b=wvq+rbGo0nbPLpBIIy/4J3hK/m8LVjXZZDV1mWCJYJDaskKTOdJFUYJClcV5cQjinC EgwdFTEXMYBxzF3G5sO5PWBJOwQUEFk4F32vwv6UmEMBuP8/gNjGA1M3Bxho9ZGrh3pL ao3eILhXOwqO5IqUK7jHlHorjxwXRZHdQ/6+hNrnexb1yhZn5w3OSlmUO6K9AcseeyXs Y+0dMVUKQ62yyqq2n/3taB5qyBEibI3E95rbvh0W9NylE1lkFE7SQ00Pm+BRcuSKfrSK 6ToU0hL3J5sv96RzXqY3cmQ6Fwv6wwUGQNMsce6duS1fmm5P7WaGBhHmaJKWkIXZxWUD RUeg== MIME-Version: 1.0 X-Received: by 10.194.187.236 with SMTP id fv12mr78161967wjc.131.1427832021229; Tue, 31 Mar 2015 13:00:21 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.16.231 with HTTP; Tue, 31 Mar 2015 13:00:21 -0700 (PDT) In-Reply-To: <3956416.IomzSLxEPG@dragon.local> References: <3945228.UPHqZybedq@dragon.local> <20150331184738.GA95383@slackbox.erewhon.home> <3956416.IomzSLxEPG@dragon.local> Date: Tue, 31 Mar 2015 22:00:21 +0200 X-Google-Sender-Auth: aZsaVrCN_MUV1p7Y4n0kMoYE9Eg Message-ID: Subject: Re: USE_PYTHON=concurrent From: Antoine Brodin To: David Naylor Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Roland Smith , freebsd-python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2015 20:00:23 -0000 On Tue, Mar 31, 2015 at 9:39 PM, David Naylor wrote: > On Tuesday, 31 March 2015 20:47:38 Roland Smith wrote: >> On Mon, Mar 30, 2015 at 09:14:40PM +0200, David Naylor wrote: >> > Hi, >> > >> > I am investigating converting my ports to concurrent however I am not = sure >> > how concurrent is supposed to work: >> > >> > I looked in /usr/ports/Mk and only found a documentation reference to >> > 'concurrent'. Setting USE_PYTHON=3Dconcurrent doesn't appear to actua= lly >> > change any behaviour. >> > >> > Please could you explain this for me? >> >> From =E2=80=9C/usr/ports/Mk/Uses/python.mk=E2=80=9D: >> >> concurrent - Indicates that the port can be installed for >> different python versions at the same time. The port >> is supposed to use a unique prefix for certain >> directories using USES=3Duniquefiles:dirs (see the >> uniquefiles.mk Uses for details about the >> directories), if set to yes. Binaries receive an >> additional suffix, based on ${PYTHON_VER}. >> >> The values for the uniquefiles USES are set as >> follows: >> >> UNIQUE_PREFIX=3D ${PYTHON_PKGNAMEPREFIX} >> UNIQUE_SUFFIX=3D -${PYTHON_VER} >> >> If the port is installed for the current default >> python version, scripts and binaries in >> >> ${PREFIX}/bin >> ${PREFIX}/sbin >> ${PREFIX}/libexec >> >> are linked from the prefixed version to the >> prefix-less original name, e.g. >> bin/foo-2.7 --> bin/foo. >> >> So it seems that any port that only installs modules in >> =E2=80=9C/usr/local/lib/pythonX.Y/site-packages/=E2=80=9D could be label= ed as concurrent >> as-is. >> >> If your port wants to put things in DOCSDIR, EXAMPLESDIR, DATADIR, WWWDI= R or >> ETCDIR, you should add =E2=80=9CUSES=3Duniquefiles:dirs=E2=80=9D to your= port's Makefile. >> >> Also read =E2=80=9C/usr/ports/Mk/Uses/uniquefiles.mk=E2=80=9D. > > Thank you for your explanation, to confirm: > > So 'concurrent' shouldn't actually change any logic, but act as a flag fo= r a > build tool at actually build multiple versions of the port based on avail= able > and supported python versions? (However one might need to use uniquefile= s to > prevent file conflicts with the multiple packages from this port.) Hi, No, it isn't used as a flag for build tools. USE_PYTHON=3Dconcurrent or USES=3Duniquefiles should be used to install simultaneously a port for 2 versions of python, when those 2 installations would conflict otherwise (e.g. would install files with the same name in ${PREFIX}/bin or same directory name for ${DOCSDIR}). Ports that only install in ${PREFIX}/lib/pythonX.Y don't need anything. Cheers, Antoine