General question on how to name ports depending on python.
Matthias Petermann
matthias at d2ux.net
Sat Aug 11 09:10:58 UTC 2012
Hello,
currently I work on porting Python modules that depend on a installed finance/trytond. Basically,
trytond itself is a Python module provides the framework and a core server component that these
modules use.
During the works I found out that the ${PYTHON_PKGNAMEPREFIX} is useful for properly describing
the dependencies within a ports Makefile. That's why I changed the Makefile of trytond to contain
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
which causes the pkg name to be
py27-trytond-2.4.1_2
As the result, I can refer the trytond dependency in all ports that require it these way:
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trytond>=2.4.0:${PORTSDIR}/finance/py-trytond
My question is now about the naming if the ports directory. I have seen examples where python modules
have the "py-" prefix and others don't. When the output of pkg_info|grep tryton shows:
py27-tryton-2.4.0_1 The Tryton Client
py27-trytond-2.4.1_2 A three-tiers high-level general purpose application platfo
py27-trytond_account-2.4.1_1 The Account Module for Tryton
py27-trytond_account_invoice-2.4.1_1 The Account Invoice Module for Tryton
py27-trytond_account_product-2.4.1_1 The Account Product Module for Tryton
py27-trytond_company-2.4.0_1 The Company Module for Tryton
py27-trytond_country-2.4.0_1 The Country Module for Tryton
py27-trytond_currency-2.4.0_1 The Currency Module for Tryton
py27-trytond_party-2.4.0_1 The Party Module for Tryton
py27-trytond_product-2.4.0_1 The Product Module for Tryton
...what should ls -lad /usr/ports/finance/*tryton* look like? Currently I named it that way:
/usr/ports/finance/py-tryton (the core server module)
/usr/ports/finance/py-trytond (the client module)
/usr/ports/finance/py-trytond_account
/usr/ports/finance/py-trytond_account_invoice
/usr/ports/finance/py-trytond_account_product
/usr/ports/finance/py-trytond_company
/usr/ports/finance/py-trytond_country
/usr/ports/finance/py-trytond_currency
/usr/ports/finance/py-trytond_party
/usr/ports/finance/py-trytond_product
Is this the recommended naming scheme in general, or should the core server module and the
client module be named without "py-"?
I's be glad if you can give me some advice. I plan to port further modules for tryton and want
to make it right. Me work in progress modules can be found here: http://bsd-crew.de/~mpeterma/ports/finance/
Thanks,
Matthias
--
Matthias Petermann <matthias at d2ux.net>
More information about the freebsd-python
mailing list