Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2017 17:22:37 +0100
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Cc:        dvl@FreeBSD.org, freebsd-ports-announce@FreeBSD.org, linimon@FreeBSD.org
Subject:   Re: [FreeBSD-Ports-Announce] [HEADSUP] Flavors, and specifically, Python flavors landing today
Message-ID:  <2c693fb6-fa2a-c536-c131-a05c809286f7@FreeBSD.org>
In-Reply-To: <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org>
References:  <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--NhQwh75qWCTwMaqKmXMmbxk0HOK5B3NQ1
Content-Type: multipart/mixed; boundary="XOEubT79nNGpFdLtTUQLwQdvjIPxCumJl";
 protected-headers="v1"
From: Mathieu Arnold <mat@FreeBSD.org>
Reply-To: freebsd-ports@freebsd.org
To: freebsd-ports@freebsd.org
Cc: dvl@FreeBSD.org, freebsd-ports-announce@FreeBSD.org, linimon@FreeBSD.org
Message-ID: <2c693fb6-fa2a-c536-c131-a05c809286f7@FreeBSD.org>
Subject: Re: [HEADSUP] Flavors, and specifically, Python flavors landing today
References: <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org>
In-Reply-To: <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org>

--XOEubT79nNGpFdLtTUQLwQdvjIPxCumJl
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: fr

On 30/11/2017 =C3=A0 16:32, Mathieu Arnold wrote a beautiful email and so=
mething
messed it up completely, so he's trying again.:

Hi,

TL;DR:
=C2=A0 See https://wiki.freebsd.org/Ports/FlavorsAndSubPackages
=C2=A0 Tool developers, see https://wiki.freebsd.org/Ports/FlavorsTools
=C2=A0 All Python dependencies must have @${PY_FLAVOR} appended to them
=C2=A0

Flavors are a way to have multiple variations of a port.=C2=A0 The port i=
s built
multiple times, with the variations.=C2=A0 To declare flavors, set the FL=
AVORS
variable to the flavors you want defined.=C2=A0 The first flavor will be =
the
default:
=C2=A0=C2=A0=C2=A0
=C2=A0 FLAVORS=3D=C2=A0=C2=A0 flavor1 flavor2
=C2=A0=C2=A0=C2=A0
The flavors MUST be lowercase, and can contain [[:lower:][:digit:]_].
=C2=A0=C2=A0=C2=A0
Then, when building the port, pass the FLAVOR as an argument after make t=
o
select the flavor.
=C2=A0=C2=A0=C2=A0
=C2=A0 $ make install FLAVOR=3Dflavor2
=C2=A0=C2=A0=C2=A0
In the port, you can then change the behavior depending on the value of t=
he
FLAVOR variable.=C2=A0 Note that the different flavors MUST have differen=
t
PKGNAMEs.=C2=A0 Be sure to guard against an empty FLAVOR variable by usin=
g
${FLAVOR:U}:
=C2=A0=C2=A0=C2=A0
=C2=A0 .if ${FLAVOR:U} =3D=3D flavor2
=C2=A0 PKGNAMESUFFIX=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -foo
=C2=A0 OPTIONS_DEFAULT+=3D=C2=A0=C2=A0 FOO
=C2=A0 .endif
=C2=A0
Right now, adding FLAVORS to a port will need portmgr's approval, until w=
e
figure precise guidelines so that the number of packages does not grow
exponentially.
=C2=A0

=C2=A0

=3D=3D=3D Tools =3D=3D=3D
=C2=A0=C2=A0=C2=A0
Flavor support for ports-mgmt/poudriere was added in 3.2, be sure to
upgrade to the latest version.

=C2=A0
=3D=3D=3D Helpers =3D=3D=3D
=C2=A0
To help with flavored ports, helpers are available.=C2=A0 In these, repla=
ce <*>
with the flavor name.
=C2=A0=C2=A0=C2=A0
*_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variab=
le.
=C2=A0=C2=A0=C2=A0
*_CONFLICTS *_CONFLICTS_BUILD *_CONFLICTS_INSTALL *_PKG_DEPENDS
*_EXTRACT_DEPENDS *_PATCH_DEPENDS *_FETCH_DEPENDS *_BUILD_DEPENDS
*_LIB_DEPENDS *_RUN_DEPENDS *_TEST_DEPENDS will append to the variable.
=C2=A0=C2=A0=C2=A0
For example:
=C2=A0=C2=A0=C2=A0
=C2=A0 flavor2_PKGNAMESUFFIX=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -foo
=C2=A0=C2=A0=C2=A0
can replace:
=C2=A0=C2=A0=C2=A0
=C2=A0 .if ${FLAVOR:U} =3D=3D flavor2
=C2=A0 PKGNAMESUFFIX=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -foo
=C2=A0 .endif
=C2=A0

=C2=A0

=C2=A0
=3D=3D=3D Python =3D=3D=3D

Ports using Python via USES=3Dpython are now flavored.=C2=A0 All the py3-=
* ports
have been removed and folded into their py-* master ports.
=C2=A0=C2=A0=C2=A0
People using Poudriere and binary packages do not have to do anything.
=C2=A0=C2=A0=C2=A0
For other people, to build the Python 3.6 version of, for example,
databases/py-gdbm, you need to run:
=C2=A0=C2=A0=C2=A0
=C2=A0 # make FLAVOR=3Dpy36 install
=C2=A0
=C2=A0
Ports using USE_PYTHON=3Ddistutils are now flavored.=C2=A0 They will auto=
matically
flavors (py27, py34, py35, py36) depending on what versions they support.=


There is also a USE_PYTHON=3Dflavors for ports that do not use distutils =
but
need FLAVORS to be set.=C2=A0 A USE_PYTHON=3Dnoflavors can be set if the =
port is
using distutils but flavors are not wanted.
=C2=A0=C2=A0=C2=A0
A new USE_PYTHON=3Doptsuffix that adds PYTHON_PKGNAMESUFFIX has been adde=
d
to cope with Python ports that did not have the Python PKGNAMEPREFIX but =
are
flavored.
=C2=A0=C2=A0=C2=A0
USES=3Dpython now also exports a PY_FLAVOR variable that contains the cur=
rent
python flavor.=C2=A0 It can be used in dependency lines when the port its=
elf is
not python flavored, for example, deskutils/calibre.
=C2=A0=C2=A0=C2=A0
By default it will only generate flavors for the versions in PYTHON2_DEFA=
ULT
and PYTHON3_DEFAULT.=C2=A0 Define BUILD_ALL_PYTHON_FLAVORS in your make.c=
onf to
generate all possible flavors.=C2=A0 A port can set USE_PYTHON=3Dallflavo=
rs to have
all the flavors and not simply the default ones.
=C2=A0
In all the ports with Python dependencies, the *_DEPENDS entries MUST end=

with the flavor so that the framework knows which to build/use.=C2=A0 Thi=
s is
done
by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Pyth=
on
module with Python flavors, as the content will be the same).=C2=A0 For e=
xample:

=C2=A0 RUN_DEPENDS=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${PYTHON_=
PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}




--=20
Mathieu Arnold



--XOEubT79nNGpFdLtTUQLwQdvjIPxCumJl--

--NhQwh75qWCTwMaqKmXMmbxk0HOK5B3NQ1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJaIDBOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz
QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85IZZsQAJsWvCsCho+lETWzSsBjiVIj
hRq9Jp6dnA7kScA9+/PqT4Fvz991b3SukB2xlNIOeywSd3YCgh8KTYrtN4te5Tr9
7qYzDnkup7kxFpXGQLkp0gGujVNWhcNyVnnHEJTYOixCZ4bpqUdnyGOWl1wlKu7W
hctuKgeABYPLxDdnZXaZ7Q00Li/JWgwHsRsmN37MrkuJANK1RF424J55PtuVvSXS
rMG9js29xSrhXmR4WN+NKdaPcvtHAhkkCOJ+ll1cwbS0lZqHcQC7SRWDbCQpG3/j
Gz99aZjTfF+1F74P88UGwF01BucTtkeDVYrVoNQHAzUfEorH/G5Z1Rvy61m2duvr
dAS+Uvun+3/OjGMpWdo+6JEXV9x5RNneZe7meBwQcbFTJg+qUytU7YuhE4ogiBxS
BNe2LsMFZszjHVW2ki92n/XqJ+yy0uB7EUb191uMQKaWqOunKal+kwlmjr+AUFY/
n8qOH2TuIW+JqiFcdw4YxC6Wjq89HR4usxHXa1oiaEmwO9AId+F/DyVQLj4nIRWK
L4EFbsjnQ3/XfmLzsEwzRryeSPdNw+9TbLO1p0ct94uPps3Cwg207XWAJF2I39mC
bd7IPOsGR+O6MDnYRy+w4KBBNbDfxXhTGmyHKRB+HPd0NQBQONxzcM+drx29xwYD
y+A2mJy8iF5QKh6xAYZW
=apQe
-----END PGP SIGNATURE-----

--NhQwh75qWCTwMaqKmXMmbxk0HOK5B3NQ1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2c693fb6-fa2a-c536-c131-a05c809286f7>