Date: Thu, 30 Nov 2017 16:32:44 +0100 From: Mathieu Arnold <mat@FreeBSD.org> To: freebsd-ports@freebsd.org Cc: freebsd-ports-announce@FreeBSD.org, dvl@FreeBSD.org, linimon@FreeBSD.org Subject: [FreeBSD-Ports-Announce] [HEADSUP] Flavors, and specifically, Python flavors landing today Message-ID: <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qwS5fKuMUQNMCosfknvN3GD2E2B3cni3U Content-Type: multipart/mixed; boundary="nHefKvORv2IKrdETSpESPmQsDEoxJW3sr"; protected-headers="v1" From: Mathieu Arnold <mat@FreeBSD.org> Reply-To: freebsd-ports@freebsd.org To: freebsd-ports@freebsd.org Cc: freebsd-ports-announce@FreeBSD.org, dvl@FreeBSD.org, linimon@FreeBSD.org Message-ID: <7c9a5e55-505f-9160-2886-56c451cdf9b1@FreeBSD.org> Subject: [HEADSUP] Flavors, and specifically, Python flavors landing today --nHefKvORv2IKrdETSpESPmQsDEoxJW3sr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: fr |Hi,| | | |TL;DR:| |=C2=A0 See Ports now have flavors enabled| |=C2=A0 Tool developers, see https://wiki.freebsd.org/Ports/FlavorsTools|= |=C2=A0 All Python dependencies must have @${PY_FLAVOR} appended to them|= | ||https://wiki.freebsd.org/Ports/FlavorsAndSubPackages| || | | |Flavors are a way to have multiple variations of a port.=C2=A0 The port = is built| |multiple times, with the variations.=C2=A0 To declare flavors, set the F= LAVORS| |variable to the flavors you want defined.=C2=A0 The first flavor will be= the| |default:| |=C2=A0=C2=A0=C2=A0=C2=A0| |=C2=A0 FLAVORS=3D=C2=A0=C2=A0 flavor1 flavor2| |=C2=A0=C2=A0=C2=A0=C2=A0| |The flavors MUST be lowercase, and can contain [[:lower:][:digit:]_].| |=C2=A0=C2=A0=C2=A0=C2=A0| |Then, when building the port, pass the FLAVOR as an argument after make = to| |select the flavor.| |=C2=A0=C2=A0=C2=A0=C2=A0| |=C2=A0 $ make install FLAVOR=3Dflavor2| |=C2=A0=C2=A0=C2=A0=C2=A0| |In the port, you can then change the behavior depending on the value of the| |FLAVOR variable.=C2=A0 Note that the different flavors MUST have differe= nt| |PKGNAMEs.=C2=A0 Be sure to guard against an empty FLAVOR variable by usi= ng| |${FLAVOR:U}:| |=C2=A0=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=C2=A0| |Right now, adding FLAVORS to a port will need portmgr's approval, until = we| |figure precise guidelines so that the number of packages doesnot grow| |exponentially.| |=C2=A0=C2=A0| | | |=C2=A0=C2=A0| | | |=3D=3D=3D Tools =3D=3D=3D| |=C2=A0=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=C2=A0| |=3D=3D=3D Helpers =3D=3D=3D| |=C2=A0=C2=A0| |To help with flavored ports, helpers are available.=C2=A0 In these, repl= ace <*>| |with the flavor name.| |=C2=A0=C2=A0=C2=A0=C2=A0| |*_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variable.| |=C2=A0=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=C2=A0| |For example:| |=C2=A0=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=C2=A0| |can replace:| |=C2=A0=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=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=C2=A0| |People using Poudriere and binary packages do not have to doanything.| |=C2=A0=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| |=C2=A0 # make FLAVOR=3Dpy36 install| |=C2=A0=C2=A0| |=C2=A0=C2=A0| |Ports using USE_PYTHON=3Ddistutils are now flavored.=C2=A0 They will automatically| |flavors (py27, py34, py35, py36) depending on what versions they support= =2E| | | |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 distutilsbut flavors are not wanted.| |=C2=A0=C2=A0=C2=A0=C2=A0| |A new USE_PYTHON=3Doptsuffix that addsPYTHON_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=C2=A0| |USES=3Dpython now also exports a PY_FLAVOR variable that contains the current| |python flavor.=C2=A0 It can be used in dependency lines when the port it= self is| |not python flavored, for example, deskutils/calibre.| |=C2=A0=C2=A0=C2=A0=C2=A0| |By default it will only generate flavors for the versions in PYTHON2_DEFAULT| |and PYTHON3_DEFAULT.=C2=A0 Define BUILD_ALL_PYTHON_FLAVORS in your make.= conf to| |generate all possible flavors.=C2=A0 A port can set USE_PYTHON=3Dallflav= ors to have| |all the flavors and not simply the default ones.| |=C2=A0=C2=A0| |In all the ports with Python dependencies, the *_DEPENDS entries MUST en= d| |with the flavor so that the framework knows which to build/use.=C2=A0 Th= is is done| |by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python| |module with Python flavors, as the content will be the same).=C2=A0 For example:| | | |=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 --nHefKvORv2IKrdETSpESPmQsDEoxJW3sr-- --qwS5fKuMUQNMCosfknvN3GD2E2B3cni3U 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 iQJ8BAEBCgBmBQJaICSfXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85ITq0P/jNHkXS44nQtCmgtc+vv3FnU Uf2we755iTNOUQY/ZtX9h31c3mFD/mzwj4QxTKu3u8HbhLk26rS1LE2YjdBXP3Ff 8GPGMuzXJP2nXPdrGf0lLNWB2yVaxS+/Io5Oq8CtOtE6e7+3zLxOjG+RGbawcqbL DaMbbeYS6hFmE2KevAVdC4ybmalH5shgxbmaF49UOtGGR91q2Dz8z8jQ27OKaZWi QU56VAjFXf8EPhd29KjbxP00ChQZ589KbtbVpkPsf1KndN0y5kEJtRWifWe7Jzir EdwIDa6BHgOuqmpaUbExj0DnQiPgTWldY81ECCy/kmRPc0/L9oqZ+YQk4ll3e4nO E3O2PbKWDbzbGB4xfV1eKUtBz9GwGP/04P9HjL5IDkbOQKpEXML2DmRk7HSmuXGj /o3SDQBo5fbAIPQv2SPbxvns4S+JbBT4i0M9tAaRsMZ3+g9P+rKM/n3MmOUDyYdD 4a4s+Lc1wZdC7vFcv8PqE6O+AJx8wYHpdg+SoAjb2TN+yRaJrj1kI1cItG6yzmfr ds11YbclXzoJKlxfEMa1iJBTtdehuTFrh/yKCwTolRFeH/u3rFo7X4p6mdn+tLa3 bWJWzRn/8ZiSCTjXW37NBecBlm2OLWGCCHgJxJ/PkchylOskdZaf9rREsp4ZRNOA knk4DA3T6DSLV4GUq8SV =3B4T -----END PGP SIGNATURE----- --qwS5fKuMUQNMCosfknvN3GD2E2B3cni3U--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7c9a5e55-505f-9160-2886-56c451cdf9b1>