Python Package Guidelines

From ParabolaWiki
Jump to: navigation, search
Package creation guidelines


Writing PKGBUILDs for software written in Python.

1 Package Naming

For libraries, use python-modulename. For applications, use the program name. In either case, the name should be entirely lowercase.

Python2 libraries should instead be named python2-modulename.

2 File Placement

Most python packages are installed with the distutils system using, which places files under /usr/lib/python<python version>/site-packages/pkgname directory.

3 Notes

The --optimize parameter compiles .pyo files so they can be tracked by pacman.

In most cases, you should put any in the arch array since most Python packages are architecture independent.

Please do not install a directory named just tests, as it easily conflicts with other python packages. (Like /usr/lib/python2.7/site-packages/tests/)

4 Example

An example PKGBUILD can be found at /usr/share/pacman/PKGBUILD-python.proto, which is in the abs package.

5 Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.