Difference between revisions of "Python package guidelines"

From ArchWiki
Jump to: navigation, search
(added links to related articles with Template:Package Guidelines)
(fix template #2)
Line 1: Line 1:
 
[[Category:Package development (English)]]
 
[[Category:Package development (English)]]
 
{{i18n|Python Package Guidelines}}
 
{{i18n|Python Package Guidelines}}
 
{{Article summary start}}
 
{{Article summary text|Writing [[PKGBUILD]]s for sowtware written in [[Python]].}}
 
 
{{Package Guidelines}}
 
{{Package Guidelines}}
{{Article summary end}}
 
  
 
== Package Naming ==
 
== Package Naming ==

Revision as of 22:08, 18 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Package Guidelines

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.

File Placement

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

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/)

Example

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