Questions about packaging Python modules in Ports Collection

Matthias Petermann matthias at petermann-it.de
Fri Feb 20 13:42:16 UTC 2015


Hello,

I am maintaining the Tryton ports for FreeBSD and am about to prepare 
the update from 2.8 to 3.4. Because I think there is some potential to 
improve, I would like to address some questions and ask for advice from 
the FreeBSD Python community.

First, please allow me to give you some background. Tryton consists of a 
framework (client and server component), as well as a large number (67) 
of functional modules that add business domain functionality to the 
framework. All this modules together make up a comprehensive ERP 
solution. If one wants to use only a subset from them, the framework 
allows to enable / disable them on the fly, even if they all are 
installed.

The framework components are located in:

/usr/ports/finance/tryton28 (client)
/usr/ports/finance/trytond28 (server)

and most of the functional modules in:

/usr/ports/finance/trytond28_*

For each of the functional modules there is a separate port provided, 
utilizing distutils and autoplist.

This works good, but I think of the following potential issues:

I) Looking on this with a users eye, it doesn't make too much sense to 
install only a subset of the modules. Some don't even provide standalone 
functionality but only provide dependencies to other modules. So most 
users likely want to install the complete set of Tryton modules and turn 
them on / off in the frameworks configuration later.

II) Supporting multiple Tryton versions at the same time. The Tryton 
project does a very good job in providing security fixes for legacy 
releases for a quite long period. From a users point of view it is 
desirable to have the versions introduced to Ports Collection supported 
until their upstream EOL. This is required to not force anyone to 
upgrade to the newest version each, because this is not always possible 
when running this in production. On the other hand, having at least the 
newest version available in the ports is required to keep FreeBSD 
attractive as the platform for new Tryton users.

What do you think on the following?

1) Is the large number of separate modules in the sense of the 
principles of the ports collection? My observations is that this blows 
up the directory pretty much.

2) Is the statement II) valid or do I overestimate the needs of the 
typical FreeBSD user base?

3) Is it technically possible to bundle multiple distutils python 
modules into one port? Is there a good example you know?

4) With regards to I), is it suggested to keep the functional modules as 
separate ports, or should I apply 3) if technically possible?

5) In ports collection, is it allowed in a port to reference a (common) 
Makefile of another port? I have seen in NetBSDs pkgsrc for the Tryton 
port, they source common stuff like the version number of Tryton from a 
common Makefile:

For example, this modules Makefile:
http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/finance/py-trytond-account/Makefile
uses this:
http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/py-trytond/Makefile.common

I'll be thankful for any hint and comments.

Thanks in advance & kind regards,
Matthias



More information about the freebsd-questions mailing list