Next: , Previous: , Up: Pautas de empaquetamiento   [Contents][Index]


22.6.8 Módulos Python

Actualmente empaquetamos Python 2 y Python 3, bajo los nombres de variable Scheme python-2 y python como se explica en Versiones numéricas. Para evitar confusiones y conflictos de nombres con otros lenguajes de programación, parece deseable que el nombre de paquete para un módulo Python contenga la palabra python.

Some modules are compatible with only one version of Python, others with both. If the package Foo is compiled with Python 3, we name it python-foo. If it is compiled with Python 2, we name it python2-foo. Python 2 packages are being removed from the distribution; please do no not submit any new Python 2 packages.

Si un proyecto ya contiene la palabra python, la eliminamos; por ejemplo, el módulo python-dateutil se empaqueta con los nombres python-dateutil y python2-dateutil. Si el nombre del proyecto empieza con py (por ejemplo pytz), este se mantiene y el prefijo es el especificado anteriormente..

Nota: Currently there are two different build systems for Python packages in Guix: python-build-system and pyproject-build-system. For the longest time, Python packages were built from an informally specified setup.py file. That worked amazingly well, considering Python’s success, but was difficult to build tooling around. As a result, a host of alternative build systems emerged and the community eventually settled on a formal standard for specifying build requirements. pyproject-build-system is Guix’s implementation of this standard. It is considered “experimental” in that it does not yet support all the various PEP-517 build backends, but you are encouraged to try it for new Python packages and report any problems. It will eventually be deprecated and merged into python-build-system.

22.6.8.1 Especificación de dependencias

Dependency information for Python packages is usually available in the package source tree, with varying degrees of accuracy: in the pyproject.toml file, the setup.py file, in requirements.txt, or in tox.ini (the latter mostly for test dependencies).

Su misión, cuando escriba una receta para un paquete Python, es asociar estas dependencias con el tipo apropiado de “entrada” (see inputs). Aunque el importador de pypi normalmente hace un buen trabajo (see Invocación de guix import), puede querer comprobar la siguiente lista para determinar qué dependencia va dónde.


Next: Módulos Perl, Previous: Paquetes Emacs, Up: Pautas de empaquetamiento   [Contents][Index]