sábado, 28 de septiembre de 2013

Python Package Managers

Python programming language is consolidating its position among the most used programming languages, only after more consolidated languages as C/C++ or Java.

Far from being just a scripting language, Python is being widely deployed to other functionalities such as Web programming (with Django as a powerful driver), Mathematics, Graphics and Game programming, and many other [1].

As a consequence of Python increasing popularity, many attention has to be paid on how Python programs are packaged and deployed, especially when talking about Open Source Python software.

For a Python programming newbie, it is essential to know the existence of Python Package Index (PyPI). But, which are indeed the main causes of having to use PyPI. Better than anyone, Alex Clark's blog collects a good reason of them [2]:

- "Everybody wins": As PyPI is the center, canonical place of Python packages.
- "It is the Right thing to Do": As PyPI is a software release server, that can even be considered as a backup for those software projects that host their own release servers.
- "Because it does not have to be perfect": As developers and maintainers of the place are happy to consider all recommendations, being conscious that it is not as "sexy" as Github, Bitbucket or other places.
- "Because it is not that hard": Packaging and deploying software on an structured basis as the one proposed by PyPI, and although some issues are still there, such as "easy_install" performance, important efforts are in progress for Python setuptools to improve day by day.

Besides this, some alternatives are being provided in order to fix issues with easy_install. In particular, a tool for installing and managing Python packages, PIP, appears as an alternative in order to provide some improvements such as [3]:

- Packages are downloaded before installation, meaning partially-completed installation are avoided.
- Improved usage on console is provided.
- PIP keeps track of the state, meaning that, for a particular package, PIP keeps a record of the reason why that package has been installed.
- Error messages provided are most descriptive
- Code is concise, cohesive, and easier to program.
- PIP allows the installation of flat packages, not as an egg archive.
- Support for other version control systems, in particular GIT, Mercurial and Bazaar, is provided.
- It is simple to define fixed set of requirements and reproduce a set of packages on a reliably way.

So, to summarize, and with alternatives available to those parts which are less robust, as happens with PIP to easy_install, there is no reason why a Python programmer should not release its software to PyPI.

[1] http://sarroutbi-fsw.blogspot.com.es/2013/09/best-python-open-source-libraries.html
[2] http://blog.aclark.net/2011/01/31/in-defense-of-pypi/
[3] http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install

No hay comentarios:

Publicar un comentario