• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Using Python Packages - An Overview
 

Using Python Packages - An Overview

on

  • 2,927 views

A short overview over the Python packaging ecosystem.

A short overview over the Python packaging ecosystem.

Statistics

Views

Total Views
2,927
Views on SlideShare
1,889
Embed Views
1,038

Actions

Likes
1
Downloads
29
Comments
0

4 Embeds 1,038

http://daniel.hepper.net 1028
http://localhost 5
http://translate.googleusercontent.com 3
http://webcache.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Using Python Packages - An Overview Using Python Packages - An Overview Presentation Transcript

    • Using Python Packages An Overview Daniel Hepper <daniel.hepper@epicco.de> @danielhepper PyCologne – 12.01.2011
    • Using Python Packages An Overview ● distutils A lot of names, ● Setuptools a lot of confusion. ● easy_install Distribute ??? ● ● pip ● virtualenv ● virtualenvwrapper12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 2
    • distutils $ python setup.py install ● allows building and installing modules ● part of standard library since Python 1.6 ● no uninstalling or listing of packages ● no dependency handling12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 3
    • setuptools $ easy_install MyPackage ● created by Phillip J. Eby ● enhancements to distutils ● handles dependencies ● introduces egg files ● download packages from PyPI ● no uninstalling of packages ● currently unmaintained12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 4
    • Distribute ● created by the The fellowship of the packaging ● fork of setuptools ● drop-in replacement ● actively maintained ● support for Python 312.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 5
    • Pip ● written by Ian Bicking ● stands for Pip Installs Python ● replacement for easy_install ● uninstallation of packages ● requirements files ● native support for other VCS ● no eggs!12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 6
    • Pip Commands ● install: Install packages ● uninstall: Uninstall packages ● freeze: Output all currently installed packages ● search: Search PyPI ● bundle: Create pybundles ● help: Show available commands ● unzip: Unzip individual packages ● zip: Zip individual packages12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 7
    • Searching$ pip search djangodjango­gencal             ­ django­gencal is a resuable Djanemencia.django.downloader ­ Downloader app like dl.free.fr idjango­voting             ­ Generic voting application for Ddjango­composition        ­ `django­composition` provides thdjango­invitation         ­ Built on top of django­registrat…django­cnotes             ­ Django cnotes provides a simple django_messages_framework ­ Backport of django (dev)s messablogango                  ­ A django based blogdjango­fancy­autocomplete ­ A simple AJAX autocomplete helpe12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 8
    • Freezing & Requirements files$ pip freezeBrlapi==0.5.5CouchDB==0.6Couchapp==0.7.2GnuPGInterface==0.3.2GoldenRatio==1.0.0Jinja2==2.5.5Mako==0.3.4MarkupSafe==0.9.2PAM==0.4.2PIL==1.1.7...12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 9
    • Freezing & Requirements files$ pip freeze > requirements.txt$ pip ­r requirements.txt12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 10
    • Virtualenv ● written by Ian Bicking ● creates isolated Python environments $ virtualenv ENV ● creates ENV/lib/pythonX.Y/site­packages ● install interpreter in ENV/bin/python ● installs Setuptools, ­­distribute installs Distribute ● no site packages with ­­no­site­packages ● activate with . bin/activate12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 11
    • virtualenvwrapper ● written by Doug Hellmann ● set of extensions to virtualenv ● puts environments in one place ● easy switching between environments ● hook scripts12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 12
    • Summary enhanced by replaced by distutils Setuptools Distribute provides provides easy_install replaced by supports pip virtualenv extended with virtualenvwrapper12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 13
    • References ● distutils documentation http://docs.python.org/library/distutils.html ● setuptools on Python Package Index http://pypi.python.org/pypi/setuptools ● Distribute documentation http://packages.python.org/distribute/ ● Pip documentation http://pip.openplans.org/12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 14
    • References (cont.) ● virtualenv documentation http://virtualenv.openplans.org/ ● virtualenvwrapper homepage http://www.doughellmann.com/projects/virtualenvwrapper/ ● “Der Eierkocher”, talk by Chris Arndt (German) http://chrisarndt.de/talks/cooking-eggs/cooking-eggs-vortrag.html12.01.2011 Daniel Hepper <daniel.hepper@epicco.de> 15