Saturday 4:15 p.m.–5 p.m.
Python packaging simplified, for end users, app developers, and open source contributors
- Audience level:
- Best Practices & Patterns
This talk covers the practical use of Python packaging tools. You'll see how to keep your system clean as an end user excited about installing a Python module from the web, the purpose of setup.py, how virtualenv makes life easier (and sometimes harder), what Ubuntu/Debian tools can offer, and how to make a complex app easier for new contributors to run. It is heavy on stories and recommendations.
Installing Python code is easy. Uninstalling it, keeping it up to date, or keeping it separate from other installed Python code, is where the difficulty lies. There are a number of tools to help you with these tasks, each of which have their place: buildout, virtualenv, pip, setup.py develop, Ubuntu/Debian packages, and distributing an operating system template for a virtual machine with (for example) Vagrant. This talk steps you through a few scenarios, choosing appropriate goals for each scenario, to come to recommendations you can use immediately. If you are any of the following, you'll enjoy the talk: * An end-user looking to install the latest Python module * A one-off module author, trying to make sure people can install your creation * A professional programmer looking to make your Python web app easier for new developers to work on, be they co-workers or open source contributors. Failures and stories are the building blocks of experience; by attending this talk, you'll be able to learn from mine rather than repeating them. We'll discuss: * How to avoid wasting time recompiling lxml and Twisted every time you want to work on a new project. * How to make dependencies optional, so your designer can have an easy time styling your app, without first having to install a C compiler for MySQLdb, or a JDK for Solr. * How your app, like the OpenHatch Django app, can go from a 1 hour dev setup process into a 5 minute one (and how we test that). * How to identify and address conflicts between apt-get and pip.