Chapter 9. Package Management

Introduction

Package management is a one of the most critical factors in the
success of a software development project. Package
management can be thought of as the shipping company in an e-commerce
business, such as Amazon. If there were no shipping companies, Amazon
would not exist. Likewise, if there is not a functional, simple, robust
package management system for an operating system or language, then it
will be limited to some degree.

When we mention “package management,” your first thoughts are
probably drawn toward .rpm files and yum, or
.deb files and apt or some other operating system
level package management system. We’ll get into that in this chapter, but
the primary focus is on packaging and managing Python code and your Python
environment. Python has always had ways to make Python code universally
accessible to the entire system. Recently, though, there have been some
projects which have improved the flexibility and usability of packaging,
managing, and deploying Python code.

Some of these recent projects include setuptools, Buildout, and
virtualenv. Buildout, setuptools, and virtualenv are often about
development, development libraries, and dealing with development
environments. But at their heart, they are mostly about using Python to
deploy Python code in operating system-agnostic ways. (Note that we did
say “mostly” here.)

Another deployment scenario involves creating operating system-specific packages and deploying them to an end user’s ...

The best content for your career. Discover unlimited learning
on demand for around $1/day.