Poudriere / makefile / python3 sqlite3 dependency
FreeBSD at ShaneWare.Biz
Mon Nov 9 06:37:44 UTC 2015
On 09/11/2015 07:46, Phil Pennock wrote:
> How do I declare a dependency upon py34-sqlite3 in a Ports Makefile,
> please? In an environment where py27 is the default.
> More context: Poudriere builds, ports tree overlay of meta-ports using
> RUN_DEPENDS, `jail-foo` meta-port for installing in jail `foo` to pull
> in all software dependencies. This setup has been working fine for the
> past couple of years.
> Mail-server port, pulls in mailman (so needs python2) and I want to
> use some python3 scripts I wrote a while back but didn't get around to
> enabling before now. python3 is installed, no problem. sqlite3, split
> out from the main Python build, I have failed to persuade to build as
I have setup meta ports in the past, since using poudriere I have
dropped that for a file of ports that gets used by poudriere.
The best way I found to build both py27 and py34 ports is to build them
in different builds. As ports with py2.x only dependencies break with
py34 as default we remove the broken ones from the list of py34 ports.
The other thing to watch is that so far we want to use py2.7 as default
then set PYTHON_VERSION when we want to build py34 ports. This allows
the py34 ports to be installed in an environment that has a py27 version
as default without conflicts. As removing py27 is painful at this point
it is just easier to work with both being installed.
Having setup poudriere with a jail called 10.2amd64 we use the set
option to get two build sets from it. Each set can then use it's own
We then build the ports in two passes with-
poudriere bulk -j 10.2amd64 -p ptree -z foojail -f /root/foojailports
poudriere bulk -j 10.2amd64 -p ptree -z foojailpy34 -f
To finish off we configure pkg to use both pkg sets in
Of course inside the jail you could either mount the pkg dirs locally
and adjust the paths or use a remote url.
Now when you `pkg install database/py-sqlite3` it will install both
py27 and py34 versions.
You could also use `pkg install py34-sqlite3-3.4.3_6` to get only one
FreeBSD - the place to B...Software Developing
More information about the freebsd-questions