Distribute Your Software

Overview

Teaching: 5 min
Exercises: 10 min
Questions
  • How should I package my software for release?

Objectives
  • Explain how and why to describe software dependencies in machine-readable form.

  • Explain why development machines should always be set up using package descriptions.

Requirements for a Simple Website

This requirements.txt file specifies that a website needs Django version 1.9.something, any version of PyYAML, and Version 2.0 or later of the requests library. Running pip install -r requirements.txt on the command line will find and install this software.

Django>=1.9,<1.10
PyYAML
requests>=2.0

Ask Your Doctor: Is Packaging Right for You?

  1. What language is your project primarily implemented in? Does a package manager exist for this language?
  2. Write down your project’s dependencies. Can these be installed with a package manager? Is this the same package manager as above?
  3. How do you know if your dependency list is correct? How would you know if something changed and it fell out of date?

Key Points

  • Every software ecosystem now includes a package manager to track and update dependencies.

  • Describe software versions in precise machine-readable form to take advantage of these.

  • Always set up development machines using the package description in order to ensure it’s up to date.