SlideShare a Scribd company logo
1 of 23
Download to read offline
Rolling with the Times
Using Wheels, pbr, and Twine
for Distributing and Installing Software
Doug Hellmann
PyATL Feb 2015
Dist Formats
• sdist
• source only
• requires compiler to install C extensions
• egg
• binary importable format
• defacto standard
• wheel
• binary installable format
• follows PyPA team standards
Wheel File Names
{distribution}-{version}(-{build tag})?-
{python tag}-{abi tag}-{platform tag}.whl
• distribution – software name
• version-buildtag – version string for distribution
• python tag – version of python
• abitag – C extension application binary interface
• platform tag – CPU architecture
Building sdists
$ python setup.py sdist
…
$ tar ztf dist/entry_point_inspector-0.1.tar.gz
entry_point_inspector-0.1/
entry_point_inspector-0.1/entry_point_inspector/
entry_point_inspector-0.1/entry_point_inspector/__init__.py
entry_point_inspector-0.1/entry_point_inspector/app.py
entry_point_inspector-0.1/entry_point_inspector/ep.py
entry_point_inspector-0.1/entry_point_inspector/group.py
entry_point_inspector-0.1/entry_point_inspector.egg-info/
entry_point_inspector-0.1/entry_point_inspector.egg-info/dependency_links.txt
entry_point_inspector-0.1/entry_point_inspector.egg-info/entry_points.txt
entry_point_inspector-0.1/entry_point_inspector.egg-info/namespace_packages.txt
entry_point_inspector-0.1/entry_point_inspector.egg-info/not-zip-safe
entry_point_inspector-0.1/entry_point_inspector.egg-info/PKG-INFO
entry_point_inspector-0.1/entry_point_inspector.egg-info/requires.txt
entry_point_inspector-0.1/entry_point_inspector.egg-info/SOURCES.txt
entry_point_inspector-0.1/entry_point_inspector.egg-info/top_level.txt
entry_point_inspector-0.1/PKG-INFO
entry_point_inspector-0.1/README.rst
entry_point_inspector-0.1/setup.cfg
entry_point_inspector-0.1/setup.py
Building eggs
$ python setup.py bdist_egg
…
$ unzip -l dist/entry_point_inspector-0.1-py2.7.egg
Archive: dist/entry_point_inspector-0.1-py2.7.egg
Length Date Time Name
-------- ---- ---- ----
1 01-02-15 11:50 EGG-INFO/dependency_links.txt
224 01-02-15 11:50 EGG-INFO/entry_points.txt
1 01-02-15 11:50 EGG-INFO/namespace_packages.txt
1 07-26-13 15:47 EGG-INFO/not-zip-safe
5132 01-02-15 11:50 EGG-INFO/PKG-INFO
6 01-02-15 11:50 EGG-INFO/requires.txt
511 01-02-15 11:50 EGG-INFO/SOURCES.txt
22 01-02-15 11:50 EGG-INFO/top_level.txt
0 07-26-13 15:49 entry_point_inspector/__init__.py
154 01-02-15 11:50 entry_point_inspector/__init__.pyc
659 07-26-13 17:12 entry_point_inspector/app.py
1346 01-02-15 11:50 entry_point_inspector/app.pyc
2148 07-26-13 17:13 entry_point_inspector/ep.py
2264 01-02-15 11:50 entry_point_inspector/ep.pyc
1527 07-26-13 16:59 entry_point_inspector/group.py
2503 01-02-15 11:50 entry_point_inspector/group.pyc
-------- -------
16499 16 files
Building Wheels
$ python setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
[cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command ‘bdist_wheel'
Building Wheels
$ python setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2
[cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command ‘bdist_wheel'
$ pip install wheel
Collecting wheel
Using cached wheel-0.24.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.24.0
Building Wheels
$ python setup.py bdist_wheel
…
$ unzip -l dist/entry_point_inspector-0.1-py2-none-any.whl
Archive: dist/entry_point_inspector-0.1-py2-none-any.whl
Length Date Time Name
-------- ---- ---- ----
0 07-26-13 15:49 entry_point_inspector/__init__.py
659 07-26-13 17:12 entry_point_inspector/app.py
2148 07-26-13 17:13 entry_point_inspector/ep.py
1527 07-26-13 16:59 entry_point_inspector/group.py
3761 01-02-15 11:59 entry_point_inspector-0.1.dist-info/DESCRIPTION.rst
224 01-02-15 11:59 entry_point_inspector-0.1.dist-info/entry_points.txt
1265 01-02-15 11:59 entry_point_inspector-0.1.dist-info/metadata.json
1 01-02-15 11:59 entry_point_inspector-0.1.dist-info/
namespace_packages.txt
22 01-02-15 11:59 entry_point_inspector-0.1.dist-info/top_level.txt
92 01-02-15 11:59 entry_point_inspector-0.1.dist-info/WHEEL
4518 01-02-15 11:59 entry_point_inspector-0.1.dist-info/METADATA
1134 01-02-15 11:59 entry_point_inspector-0.1.dist-info/RECORD
-------- -------
15351 12 files
Wheel File Contents
• .py source files
• .so/.dll library files
• dist-info standard metadata
• no setup.py
sdist Installation
$ mktmpenv
$ pip install --no-cache-dir entry_point_inspector
Collecting entry-point-inspector
Downloading entry_point_inspector-0.1.tar.gz
Collecting cliff (from entry-point-inspector)
Downloading cliff-1.9.0-py2-none-any.whl
Collecting cmd2>=0.6.7 (from cliff->entry-point-inspector)
Downloading cmd2-0.6.8.tar.gz
Collecting stevedore>=1.1.0 (from cliff->entry-point-inspector)
Downloading stevedore-1.1.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.1 (from cliff->entry-point-inspector)
Downloading pyparsing-2.0.3-py2.py3-none-any.whl
Collecting pbr!=0.7,<1.0,>=0.6 (from cliff->entry-point-inspector)
Downloading pbr-0.10.7-py2.py3-none-any.whl (70kB)
100% |################################| 73kB 1.0MB/s
Collecting PrettyTable<0.8,>=0.7 (from cliff->entry-point-inspector)
Downloading prettytable-0.7.2.tar.bz2
Requirement already satisfied (use --upgrade to upgrade): pip in ./lib/python2.7/site-packages (from pbr!
=0.7,<1.0,>=0.6->cliff->entry-point-inspector)
Installing collected packages: PrettyTable, pbr, pyparsing, stevedore, argparse, six, cmd2, cliff, entry-point-
inspector
Running setup.py install for PrettyTable
Running setup.py install for cmd2
Running setup.py install for entry-point-inspector
Installing epi script to /Users/dhellmann/Envs/tmp-14f1bec315f89c0c/bin
Successfully installed PrettyTable-0.7.2 argparse-1.3.0 cliff-1.9.0 cmd2-0.6.8 entry-point-inspector-0.1
pbr-0.10.7 pyparsing-2.0.3 six-1.9.0 stevedore-1.1.0
Speeding Up Installation
$ cat ~/.pip/pip.conf
[global]
wheel-dir = /Users/dhellmann/.pip/wheelhouse
find-links = /Users/dhellmann/.pip/wheelhouse
Building Wheels of Other
Packages
$ pip wheel cmd2
Collecting cmd2
Using cached cmd2-0.6.8.tar.gz
Collecting pyparsing>=2.0.1 (from cmd2)
Using cached pyparsing-2.0.3-py2.py3-none-any.whl
Saved /Users/dhellmann/.pip/wheelhouse/pyparsing-2.0.3-
py2.py3-none-any.whl
Skipping pyparsing, due to already being wheel.
Building wheels for collected packages: cmd2
Running setup.py bdist_wheel for cmd2
Destination directory: /Users/dhellmann/.pip/wheelhouse
Successfully built cmd2
Wheel Installation
$ mktmpenv
$ pip install entry_point_inspector
Collecting entry-point-inspector
Collecting cliff (from entry-point-inspector)
Collecting cmd2>=0.6.7 (from cliff->entry-point-inspector)
Collecting six>=1.7.0 (from cliff->entry-point-inspector)
Collecting argparse (from cliff->entry-point-inspector)
Collecting stevedore>=1.1.0 (from cliff->entry-point-inspector)
Collecting pyparsing>=2.0.1 (from cliff->entry-point-inspector)
Collecting pbr!=0.7,<1.0,>=0.6 (from cliff->entry-point-inspector)
Collecting PrettyTable<0.8,>=0.7 (from cliff->entry-point-inspector)
Requirement already satisfied (use --upgrade to upgrade): pip in ./lib/python2.7/site-packages (from
pbr!=0.7,<1.0,>=0.6->cliff->entry-point-inspector)
Installing collected packages: PrettyTable, pbr, pyparsing, stevedore, argparse, six, cmd2, cliff,
entry-point-inspector
Successfully installed PrettyTable-0.7.2 argparse-1.3.0 cliff-1.9.0 cmd2-0.6.8 entry-point-
inspector-0.1 pbr-0.10.7 pyparsing-2.0.3 six-1.9.0 stevedore-1.1.0
pbr – Python Build
Reasonableness
• Automatically gather meta-data
• Static meta-data as data, not code
• Automatically generate release files
pbr – Gathered Meta-data
• git ls → SOURCES.txt
• requirements.txt → install_requires
• README.rst → long_description
• git tag → version
pbr – Static Meta-data
• Name
• Trove Classifiers
• Home Page
• Python Packages
• Entry Points
pbr – Automatically
Generate Release Files
• AUTHORS
• ChangeLog
pbr – setup.py
#!/usr/bin/env python
import setuptools
setuptools.setup(
setup_requires=['pbr'],
pbr=True)
pbr – setup.cfg
[metadata]
name = oslo.config
author = OpenStack
author-email = openstack-
dev@lists.openstack.org
summary = Oslo Configuration API
description-file =
README.rst
home-page = https://launchpad.net/oslo
classifier =
Development Status :: 4 - Beta
Environment :: OpenStack
Intended Audience :: Developers
Intended Audience :: Information
Technology
License :: OSI Approved :: Apache
Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
[files]
packages =
oslo_config
twine – Upload dists to PyPI
• Upload Existing Packages
• Supports sdist, egg, & wheel
• GPG Signature Files
twine
$ twine -h
usage: twine [-h] [--version] {upload}
positional arguments:
{upload}
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
twine – Uploading Signed
dists
python setup.py sdist
python setup.py bdist_wheel
gpg --detach-sign -a $sdistfile
gpg --detach-sign -a $wheelfile
twine upload $sdistfile $sdistsignfile
$wheelfile $wheelsignfile
References
• https://www.python.org/dev/peps/pep-0427/
• http://lucumr.pocoo.org/2014/1/27/python-on-
wheels/
• http://pythonwheels.com
• https://www.berrange.com/posts/2014/11/14/faster-
rebuilds-for-python-virtualenv-trees/

More Related Content

What's hot

Postgresql 9.0 HA at LOADAYS 2012
Postgresql 9.0 HA at LOADAYS 2012Postgresql 9.0 HA at LOADAYS 2012
Postgresql 9.0 HA at LOADAYS 2012Julien Pivotto
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성Young Pyo
 
Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana Chanaka Lasantha
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesSeveralnines
 
Code review and automated testing for Puppet code
Code review and automated testing for Puppet codeCode review and automated testing for Puppet code
Code review and automated testing for Puppet codewzzrd
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxRavi Kumar Lanke
 
DevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven InfrastructureDevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven InfrastructureAntons Kranga
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopNovell
 
TESTING - Drop 12c RAC Database, Database Software and GI
TESTING - Drop 12c RAC Database, Database Software and GITESTING - Drop 12c RAC Database, Database Software and GI
TESTING - Drop 12c RAC Database, Database Software and GIMonowar Mukul
 
RMOUG 2013 - Where did my CPU go?
RMOUG 2013 - Where did my CPU go?RMOUG 2013 - Where did my CPU go?
RMOUG 2013 - Where did my CPU go?Kristofferson A
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleSean Chittenden
 
greenplum installation guide - 4 node VM
greenplum installation guide - 4 node VM greenplum installation guide - 4 node VM
greenplum installation guide - 4 node VM seungdon Choi
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixDavid Bosschaert
 
Cookbook testing with KitcenCI and Serverrspec
Cookbook testing with KitcenCI and ServerrspecCookbook testing with KitcenCI and Serverrspec
Cookbook testing with KitcenCI and ServerrspecDaniel Paulus
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTJoshua Thijssen
 

What's hot (19)

Postgresql 9.0 HA at LOADAYS 2012
Postgresql 9.0 HA at LOADAYS 2012Postgresql 9.0 HA at LOADAYS 2012
Postgresql 9.0 HA at LOADAYS 2012
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성
 
Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana
 
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines SlidesMySQL Cluster 7.3 Performance Tuning - Severalnines Slides
MySQL Cluster 7.3 Performance Tuning - Severalnines Slides
 
Code review and automated testing for Puppet code
Code review and automated testing for Puppet codeCode review and automated testing for Puppet code
Code review and automated testing for Puppet code
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linux
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
DevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven InfrastructureDevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven Infrastructure
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation Workshop
 
Automating Network Infrastructure : Ansible
Automating Network Infrastructure : AnsibleAutomating Network Infrastructure : Ansible
Automating Network Infrastructure : Ansible
 
TESTING - Drop 12c RAC Database, Database Software and GI
TESTING - Drop 12c RAC Database, Database Software and GITESTING - Drop 12c RAC Database, Database Software and GI
TESTING - Drop 12c RAC Database, Database Software and GI
 
RMOUG 2013 - Where did my CPU go?
RMOUG 2013 - Where did my CPU go?RMOUG 2013 - Where did my CPU go?
RMOUG 2013 - Where did my CPU go?
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at Scale
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
 
Heroku pycon
Heroku pyconHeroku pycon
Heroku pycon
 
greenplum installation guide - 4 node VM
greenplum installation guide - 4 node VM greenplum installation guide - 4 node VM
greenplum installation guide - 4 node VM
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
 
Cookbook testing with KitcenCI and Serverrspec
Cookbook testing with KitcenCI and ServerrspecCookbook testing with KitcenCI and Serverrspec
Cookbook testing with KitcenCI and Serverrspec
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 

Similar to Rolling with Wheels, sdists, and Twine for Python Packaging

Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionFabio Kung
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGIMike Pittaro
 
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Evgeny Antyshev
 
Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker, Inc.
 
Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamRachid Zarouali
 
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbedDaniel Bimschas
 
CCNP Data Center Centralized Management Automation
CCNP Data Center Centralized Management AutomationCCNP Data Center Centralized Management Automation
CCNP Data Center Centralized Management AutomationE.S.G. JR. Consulting, Inc.
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 
Delivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devicesDelivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devicesAjeet Singh Raina
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvMarkus Zapke-Gründemann
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesOdoo
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaPantheon
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptxssuserb4d806
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
First python project
First python projectFirst python project
First python projectNeetu Jain
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesEastBanc Tachnologies
 
OSインストーラーの自作方法
OSインストーラーの自作方法OSインストーラーの自作方法
OSインストーラーの自作方法LINE Corporation
 

Similar to Rolling with Wheels, sdists, and Twine for Python Packaging (20)

Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
 
Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker to the Rescue of an Ops Team
Docker to the Rescue of an Ops Team
 
Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker to the Rescue of an Ops Team
Docker to the Rescue of an Ops Team
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
 
CCNP Data Center Centralized Management Automation
CCNP Data Center Centralized Management AutomationCCNP Data Center Centralized Management Automation
CCNP Data Center Centralized Management Automation
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Delivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devicesDelivering Container-based Apps to IoT Edge devices
Delivering Container-based Apps to IoT Edge devices
 
glance replicator
glance replicatorglance replicator
glance replicator
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
CKAN 2.2 Installation
CKAN 2.2 InstallationCKAN 2.2 Installation
CKAN 2.2 Installation
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
First python project
First python projectFirst python project
First python project
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc Technologies
 
OSインストーラーの自作方法
OSインストーラーの自作方法OSインストーラーの自作方法
OSインストーラーの自作方法
 

More from doughellmann

Reno: A new way to manage release notes
Reno: A new way to manage release notesReno: A new way to manage release notes
Reno: A new way to manage release notesdoughellmann
 
Reno A New Way to Manage Release Notes
Reno   A New Way to Manage Release NotesReno   A New Way to Manage Release Notes
Reno A New Way to Manage Release Notesdoughellmann
 
How OpenStack Makes Python Better (and vice-versa)
How OpenStack Makes Python Better (and vice-versa)How OpenStack Makes Python Better (and vice-versa)
How OpenStack Makes Python Better (and vice-versa)doughellmann
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...doughellmann
 
Herding cats into boxes
Herding cats into boxesHerding cats into boxes
Herding cats into boxesdoughellmann
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...doughellmann
 
OpenStack 5th Birthday
OpenStack 5th BirthdayOpenStack 5th Birthday
OpenStack 5th Birthdaydoughellmann
 
Regexes and-performance-testing
Regexes and-performance-testingRegexes and-performance-testing
Regexes and-performance-testingdoughellmann
 
OpenStack Atlanta-2014-12-18
OpenStack Atlanta-2014-12-18OpenStack Atlanta-2014-12-18
OpenStack Atlanta-2014-12-18doughellmann
 
Taking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical DebtTaking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical Debtdoughellmann
 
Oslo Program Overview, OpenStack Atlanta
Oslo Program Overview, OpenStack AtlantaOslo Program Overview, OpenStack Atlanta
Oslo Program Overview, OpenStack Atlantadoughellmann
 
Dynamic Code Patterns: Extending Your Applications with Plugins
Dynamic Code Patterns: Extending Your Applications with PluginsDynamic Code Patterns: Extending Your Applications with Plugins
Dynamic Code Patterns: Extending Your Applications with Pluginsdoughellmann
 
Better Documentation Through Automation: Creating docutils & Sphinx Extensions
Better Documentation Through Automation: Creating docutils & Sphinx ExtensionsBetter Documentation Through Automation: Creating docutils & Sphinx Extensions
Better Documentation Through Automation: Creating docutils & Sphinx Extensionsdoughellmann
 
Hidden Treasures of the Python Standard Library
Hidden Treasures of the Python Standard LibraryHidden Treasures of the Python Standard Library
Hidden Treasures of the Python Standard Librarydoughellmann
 
An Introduction to the Zen of Python
An Introduction to the Zen of PythonAn Introduction to the Zen of Python
An Introduction to the Zen of Pythondoughellmann
 

More from doughellmann (15)

Reno: A new way to manage release notes
Reno: A new way to manage release notesReno: A new way to manage release notes
Reno: A new way to manage release notes
 
Reno A New Way to Manage Release Notes
Reno   A New Way to Manage Release NotesReno   A New Way to Manage Release Notes
Reno A New Way to Manage Release Notes
 
How OpenStack Makes Python Better (and vice-versa)
How OpenStack Makes Python Better (and vice-versa)How OpenStack Makes Python Better (and vice-versa)
How OpenStack Makes Python Better (and vice-versa)
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
 
Herding cats into boxes
Herding cats into boxesHerding cats into boxes
Herding cats into boxes
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
 
OpenStack 5th Birthday
OpenStack 5th BirthdayOpenStack 5th Birthday
OpenStack 5th Birthday
 
Regexes and-performance-testing
Regexes and-performance-testingRegexes and-performance-testing
Regexes and-performance-testing
 
OpenStack Atlanta-2014-12-18
OpenStack Atlanta-2014-12-18OpenStack Atlanta-2014-12-18
OpenStack Atlanta-2014-12-18
 
Taking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical DebtTaking the Long View: How the Oslo Program Reduces Technical Debt
Taking the Long View: How the Oslo Program Reduces Technical Debt
 
Oslo Program Overview, OpenStack Atlanta
Oslo Program Overview, OpenStack AtlantaOslo Program Overview, OpenStack Atlanta
Oslo Program Overview, OpenStack Atlanta
 
Dynamic Code Patterns: Extending Your Applications with Plugins
Dynamic Code Patterns: Extending Your Applications with PluginsDynamic Code Patterns: Extending Your Applications with Plugins
Dynamic Code Patterns: Extending Your Applications with Plugins
 
Better Documentation Through Automation: Creating docutils & Sphinx Extensions
Better Documentation Through Automation: Creating docutils & Sphinx ExtensionsBetter Documentation Through Automation: Creating docutils & Sphinx Extensions
Better Documentation Through Automation: Creating docutils & Sphinx Extensions
 
Hidden Treasures of the Python Standard Library
Hidden Treasures of the Python Standard LibraryHidden Treasures of the Python Standard Library
Hidden Treasures of the Python Standard Library
 
An Introduction to the Zen of Python
An Introduction to the Zen of PythonAn Introduction to the Zen of Python
An Introduction to the Zen of Python
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Rolling with Wheels, sdists, and Twine for Python Packaging

  • 1. Rolling with the Times Using Wheels, pbr, and Twine for Distributing and Installing Software Doug Hellmann PyATL Feb 2015
  • 2. Dist Formats • sdist • source only • requires compiler to install C extensions • egg • binary importable format • defacto standard • wheel • binary installable format • follows PyPA team standards
  • 3. Wheel File Names {distribution}-{version}(-{build tag})?- {python tag}-{abi tag}-{platform tag}.whl • distribution – software name • version-buildtag – version string for distribution • python tag – version of python • abitag – C extension application binary interface • platform tag – CPU architecture
  • 4. Building sdists $ python setup.py sdist … $ tar ztf dist/entry_point_inspector-0.1.tar.gz entry_point_inspector-0.1/ entry_point_inspector-0.1/entry_point_inspector/ entry_point_inspector-0.1/entry_point_inspector/__init__.py entry_point_inspector-0.1/entry_point_inspector/app.py entry_point_inspector-0.1/entry_point_inspector/ep.py entry_point_inspector-0.1/entry_point_inspector/group.py entry_point_inspector-0.1/entry_point_inspector.egg-info/ entry_point_inspector-0.1/entry_point_inspector.egg-info/dependency_links.txt entry_point_inspector-0.1/entry_point_inspector.egg-info/entry_points.txt entry_point_inspector-0.1/entry_point_inspector.egg-info/namespace_packages.txt entry_point_inspector-0.1/entry_point_inspector.egg-info/not-zip-safe entry_point_inspector-0.1/entry_point_inspector.egg-info/PKG-INFO entry_point_inspector-0.1/entry_point_inspector.egg-info/requires.txt entry_point_inspector-0.1/entry_point_inspector.egg-info/SOURCES.txt entry_point_inspector-0.1/entry_point_inspector.egg-info/top_level.txt entry_point_inspector-0.1/PKG-INFO entry_point_inspector-0.1/README.rst entry_point_inspector-0.1/setup.cfg entry_point_inspector-0.1/setup.py
  • 5. Building eggs $ python setup.py bdist_egg … $ unzip -l dist/entry_point_inspector-0.1-py2.7.egg Archive: dist/entry_point_inspector-0.1-py2.7.egg Length Date Time Name -------- ---- ---- ---- 1 01-02-15 11:50 EGG-INFO/dependency_links.txt 224 01-02-15 11:50 EGG-INFO/entry_points.txt 1 01-02-15 11:50 EGG-INFO/namespace_packages.txt 1 07-26-13 15:47 EGG-INFO/not-zip-safe 5132 01-02-15 11:50 EGG-INFO/PKG-INFO 6 01-02-15 11:50 EGG-INFO/requires.txt 511 01-02-15 11:50 EGG-INFO/SOURCES.txt 22 01-02-15 11:50 EGG-INFO/top_level.txt 0 07-26-13 15:49 entry_point_inspector/__init__.py 154 01-02-15 11:50 entry_point_inspector/__init__.pyc 659 07-26-13 17:12 entry_point_inspector/app.py 1346 01-02-15 11:50 entry_point_inspector/app.pyc 2148 07-26-13 17:13 entry_point_inspector/ep.py 2264 01-02-15 11:50 entry_point_inspector/ep.pyc 1527 07-26-13 16:59 entry_point_inspector/group.py 2503 01-02-15 11:50 entry_point_inspector/group.pyc -------- ------- 16499 16 files
  • 6. Building Wheels $ python setup.py bdist_wheel usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command ‘bdist_wheel'
  • 7. Building Wheels $ python setup.py bdist_wheel usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command ‘bdist_wheel' $ pip install wheel Collecting wheel Using cached wheel-0.24.0-py2.py3-none-any.whl Installing collected packages: wheel Successfully installed wheel-0.24.0
  • 8. Building Wheels $ python setup.py bdist_wheel … $ unzip -l dist/entry_point_inspector-0.1-py2-none-any.whl Archive: dist/entry_point_inspector-0.1-py2-none-any.whl Length Date Time Name -------- ---- ---- ---- 0 07-26-13 15:49 entry_point_inspector/__init__.py 659 07-26-13 17:12 entry_point_inspector/app.py 2148 07-26-13 17:13 entry_point_inspector/ep.py 1527 07-26-13 16:59 entry_point_inspector/group.py 3761 01-02-15 11:59 entry_point_inspector-0.1.dist-info/DESCRIPTION.rst 224 01-02-15 11:59 entry_point_inspector-0.1.dist-info/entry_points.txt 1265 01-02-15 11:59 entry_point_inspector-0.1.dist-info/metadata.json 1 01-02-15 11:59 entry_point_inspector-0.1.dist-info/ namespace_packages.txt 22 01-02-15 11:59 entry_point_inspector-0.1.dist-info/top_level.txt 92 01-02-15 11:59 entry_point_inspector-0.1.dist-info/WHEEL 4518 01-02-15 11:59 entry_point_inspector-0.1.dist-info/METADATA 1134 01-02-15 11:59 entry_point_inspector-0.1.dist-info/RECORD -------- ------- 15351 12 files
  • 9. Wheel File Contents • .py source files • .so/.dll library files • dist-info standard metadata • no setup.py
  • 10. sdist Installation $ mktmpenv $ pip install --no-cache-dir entry_point_inspector Collecting entry-point-inspector Downloading entry_point_inspector-0.1.tar.gz Collecting cliff (from entry-point-inspector) Downloading cliff-1.9.0-py2-none-any.whl Collecting cmd2>=0.6.7 (from cliff->entry-point-inspector) Downloading cmd2-0.6.8.tar.gz Collecting stevedore>=1.1.0 (from cliff->entry-point-inspector) Downloading stevedore-1.1.0-py2.py3-none-any.whl Collecting pyparsing>=2.0.1 (from cliff->entry-point-inspector) Downloading pyparsing-2.0.3-py2.py3-none-any.whl Collecting pbr!=0.7,<1.0,>=0.6 (from cliff->entry-point-inspector) Downloading pbr-0.10.7-py2.py3-none-any.whl (70kB) 100% |################################| 73kB 1.0MB/s Collecting PrettyTable<0.8,>=0.7 (from cliff->entry-point-inspector) Downloading prettytable-0.7.2.tar.bz2 Requirement already satisfied (use --upgrade to upgrade): pip in ./lib/python2.7/site-packages (from pbr! =0.7,<1.0,>=0.6->cliff->entry-point-inspector) Installing collected packages: PrettyTable, pbr, pyparsing, stevedore, argparse, six, cmd2, cliff, entry-point- inspector Running setup.py install for PrettyTable Running setup.py install for cmd2 Running setup.py install for entry-point-inspector Installing epi script to /Users/dhellmann/Envs/tmp-14f1bec315f89c0c/bin Successfully installed PrettyTable-0.7.2 argparse-1.3.0 cliff-1.9.0 cmd2-0.6.8 entry-point-inspector-0.1 pbr-0.10.7 pyparsing-2.0.3 six-1.9.0 stevedore-1.1.0
  • 11. Speeding Up Installation $ cat ~/.pip/pip.conf [global] wheel-dir = /Users/dhellmann/.pip/wheelhouse find-links = /Users/dhellmann/.pip/wheelhouse
  • 12. Building Wheels of Other Packages $ pip wheel cmd2 Collecting cmd2 Using cached cmd2-0.6.8.tar.gz Collecting pyparsing>=2.0.1 (from cmd2) Using cached pyparsing-2.0.3-py2.py3-none-any.whl Saved /Users/dhellmann/.pip/wheelhouse/pyparsing-2.0.3- py2.py3-none-any.whl Skipping pyparsing, due to already being wheel. Building wheels for collected packages: cmd2 Running setup.py bdist_wheel for cmd2 Destination directory: /Users/dhellmann/.pip/wheelhouse Successfully built cmd2
  • 13. Wheel Installation $ mktmpenv $ pip install entry_point_inspector Collecting entry-point-inspector Collecting cliff (from entry-point-inspector) Collecting cmd2>=0.6.7 (from cliff->entry-point-inspector) Collecting six>=1.7.0 (from cliff->entry-point-inspector) Collecting argparse (from cliff->entry-point-inspector) Collecting stevedore>=1.1.0 (from cliff->entry-point-inspector) Collecting pyparsing>=2.0.1 (from cliff->entry-point-inspector) Collecting pbr!=0.7,<1.0,>=0.6 (from cliff->entry-point-inspector) Collecting PrettyTable<0.8,>=0.7 (from cliff->entry-point-inspector) Requirement already satisfied (use --upgrade to upgrade): pip in ./lib/python2.7/site-packages (from pbr!=0.7,<1.0,>=0.6->cliff->entry-point-inspector) Installing collected packages: PrettyTable, pbr, pyparsing, stevedore, argparse, six, cmd2, cliff, entry-point-inspector Successfully installed PrettyTable-0.7.2 argparse-1.3.0 cliff-1.9.0 cmd2-0.6.8 entry-point- inspector-0.1 pbr-0.10.7 pyparsing-2.0.3 six-1.9.0 stevedore-1.1.0
  • 14. pbr – Python Build Reasonableness • Automatically gather meta-data • Static meta-data as data, not code • Automatically generate release files
  • 15. pbr – Gathered Meta-data • git ls → SOURCES.txt • requirements.txt → install_requires • README.rst → long_description • git tag → version
  • 16. pbr – Static Meta-data • Name • Trove Classifiers • Home Page • Python Packages • Entry Points
  • 17. pbr – Automatically Generate Release Files • AUTHORS • ChangeLog
  • 18. pbr – setup.py #!/usr/bin/env python import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True)
  • 19. pbr – setup.cfg [metadata] name = oslo.config author = OpenStack author-email = openstack- dev@lists.openstack.org summary = Oslo Configuration API description-file = README.rst home-page = https://launchpad.net/oslo classifier = Development Status :: 4 - Beta Environment :: OpenStack Intended Audience :: Developers Intended Audience :: Information Technology License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 [files] packages = oslo_config
  • 20. twine – Upload dists to PyPI • Upload Existing Packages • Supports sdist, egg, & wheel • GPG Signature Files
  • 21. twine $ twine -h usage: twine [-h] [--version] {upload} positional arguments: {upload} optional arguments: -h, --help show this help message and exit --version show program's version number and exit
  • 22. twine – Uploading Signed dists python setup.py sdist python setup.py bdist_wheel gpg --detach-sign -a $sdistfile gpg --detach-sign -a $wheelfile twine upload $sdistfile $sdistsignfile $wheelfile $wheelsignfile
  • 23. References • https://www.python.org/dev/peps/pep-0427/ • http://lucumr.pocoo.org/2014/1/27/python-on- wheels/ • http://pythonwheels.com • https://www.berrange.com/posts/2014/11/14/faster- rebuilds-for-python-virtualenv-trees/