SlideShare a Scribd company logo
Kir Chou @ PyCon TW 2020
1
Time travel:
Let’s learn from the history of Python packaging!
Kir Chou
• PyCon TW Speaker 2017, 2018, 2019
• PyCon JP Speaker 2019, 2020
• SDE @ Amazon Search
2
@k1rch0u
kir.chou
note35
Agenda
• Motivation
• History of Python software distribution
• Learn from history
• Challenge before community’s python packaging solution
• Challenge after community’s python packaging solution
• Takeaway
• Appendix
3
Motivation
4
5
One day, our builder Tool team announced…
Let’s migrate to idiomatic tools!
6
Great! But why?
7
@di_codes
History of Python software distribution
8
9
1991
Python 1.0
10
How to give/take the work to/from others?
How to give/take the work to/from others?
11
Give Take
How to give/take the work to/from others?
12
Give Take
13
RFC822
14
1991 20052003
Python 1.0 Python 2.0
2000
PEP241 PEP345
PEP314
disutils (egg)
setuptools
2006
easy_install
PEP405
tox
virtualenv
20072008 2011
PyPI
15
Metadata: PEP241 (2001), PEP314 (2003), PEP345 (2005)
Build tool: distutils, setuptools
16
setuptools: setup.py
Metadata in EGG
xxx.egg-info/PKG-INFO
17
PyPI (Cheese Shop): PEP301 (2002/Nov)
Package Installer: easy_install
18
Isolated Environments (Build / Test / Release):
tox, virtualenv (2007), venv@PEP405 (2011)
19
20
1991 2011
Python 1.0
2008
Python 3.0
RFC822 PEP566
PEP459
PEP426
PEP427,440PEP376
20052003
Python 2.0
2000
PEP241 PEP345
PEP314
disutils (egg)
setuptools
2006
wheel
easy_install
bento/twine
PyPI
pip
PEP405
tox
virtualenv
2007
PEP394 PEP582
poetry
pipenv
2012 2017
PyPI
warehouse
PEP262
21
Deferred Metadata 2.0: PEP426 (2012), PEP459 (2013)
Metadata 2.1: PEP566 (2017/Dec)
22
PEP566: pyproject.toml
23
Version & Dependency:
PEP386 (2009/Superseded), pip-tools/pip-sync (2012)
PEP440 (2013), PEP508 (2015)
24
Package installer (2008): pip
Publish Tool (2013): bento / twine / flit
PyPI (2018): PyPI warehouse
25
Database: PEP262 (2001/Deferred), PEP376 (2009)
Wheel: PEP425 (2012) / PEP427 (2012)
26
PEP376
Database of Installed Python Distributions
xxx.dist-info/WHEEL
27
28
One For All: Conda / Pipenv / Poetry
PEP517 (2015), PEP518 (2016)
29
Learn from history
30
1. Metadata Schema Evolution
Evolution
31
2. Build Tools
1. Metadata Schema
32
2. Build Tools
1. Metadata Schema
3. Publish Tools / Package Index
Evolution
33
2. Build Tools
1. Metadata Schema
3. Publish Tools / Package Index
Evolution
4. Installer /
Deployment Tools
34
2. Build Tools
1. Metadata Schema
3. Publish Tools / Package Index
5. Multiple platform
Evolution
4. Installer /
Deployment Tools
35
2. Build Tools
1. Metadata Schema
3. Publish Tools / Package Index
5. Multiple platform / version
Evolution
4. Installer /
Deployment Tools
36
1991
Python 1.0
wheel
pipenv
poetry
The pattern is repeated per generation
2008
Python 3.0
tox
Python 2.0
2000
disutils (egg)
setuptools
virtualenv
bento/twine
easy_install pip
PyPI
warehouse
PyPI
1994 Amazon
1998 Google
37
Challenge BEFORE
community’s python packaging solution
38
1991 1998
Python 1.0
Google
1994
Amazon
No Python packaging solution
39
How to give/take the work to/from others?
Solve same problems in history
• Build tool
• build tool + dependency resolver
• Support multiple Python version
• Publish tool / Private Package Registry
• Installer / Deployment tool
• Support isolated environment
• Support multiple platforms
40
41
2. Internal Build Tools
1. Internal Package Metadata
3. Internal Package Registry
4. Internal Deployment Tools
42
3p packages are all handled by internal tools
43
44
Company
Community
X growth rate
X
Community solutions grow faster now!
~2012
Packaging problem is mostly general!
• Build System
• What is a Python package?
• How does build tool resolve Python’s dependencies?
• How to build a Python package?
• Publish System / Private Package Registry
• How to publish your Python package?
• How to download other Python’s dependencies?
• Deployment System
• How to isolate your Python environment?
• Which platform does the Python package support?
45
Shift to community solution
47
Challenge AFTER
community’s python packaging solution
1. Ecosystem
48
Community’s solution Company’s solution
Community’s solution Company’s solution
one way
two way
49
50
Cloud Services
Business
Cloud Service
Provider
Developer
Community
Sponsorship
Pay $
Invent New solution
Adopt new community solution
One for all, all for one
51
2. More standards ∝ More tools
52
53
54
Join PyCon! Join the community!
55
Review the past to understand the present
Takeaway
History &
Past Challenges
Current
Challenges
Community
Thanks!
56
Appendix
57
History
• Dustin Ingram @ SciPy 2018
Inside the Cheeseshop: How Python Packaging Works
• History of packaging written by Martijn Faassen
• Kenneth Reitz @ PyCon 2018
Pipenv: The Future of Python Dependency Management
• Clinton Roy @ Kiwi PyCon X (2019)
The Packaging Lifecycle with Poetry
• History of wheel written by Daniel Holth
58
Packaging
• Dave Forgac @ PyOhio 2015
Python Packaging from Init to Deploy
• Elana Hashman @ PyCon 2019
The Black Magic of Python Wheel
• Official Document: Packaging binary extensions (2013)
59
Runtime (Virtual) Environment
• Carl Meyer @ PyCon 2011
Reverse-engineering Ian Bicking's brain: inside pip and
virtualenv
• Bernat Gabor @ EuroPython 2019
Status quo of virtual environments
60
61
Why did 3 big cloud platforms provide
Package Registry service
JUST recently?
2019 May 2020 June 2020 July

More Related Content

PDF
The str/bytes nightmare before python2 EOL
PDF
Python, the Language of Science and Engineering for Engineers
PPTX
Python programming | Fundamentals of Python programming
PDF
Python入門 : 4日間コース社内トレーニング
PPTX
Top 10 python ide
PDF
Writing Fast Code (JP) - PyCon JP 2015
PPTX
First python project
PPTX
Python 101 for the .NET Developer
The str/bytes nightmare before python2 EOL
Python, the Language of Science and Engineering for Engineers
Python programming | Fundamentals of Python programming
Python入門 : 4日間コース社内トレーニング
Top 10 python ide
Writing Fast Code (JP) - PyCon JP 2015
First python project
Python 101 for the .NET Developer

What's hot (20)

PDF
Machine Learning in Google I/O 19
PDF
Python: the Project, the Language and the Style
PDF
E Talevich - Biopython project-update
PDF
Talk6 biopython bosc2011
PDF
Biopython Project Update 2013
PPTX
Python Course
PPTX
Installing tensorflow object detection on raspberry pi
PDF
그렇게 커미터가 된다: Python을 통해 오픈소스 생태계 가르치기
PDF
Rust + python: lessons learnt from building a toy filesystem
PDF
A commercial open source project in Python
PDF
Introduction to Python for new beginner
ODP
10 popular software programs written in python
PPT
Python Introduction
PPT
Python Introduction
ODP
Python for Android
PDF
Extending Python - FOSDEM 2015
PDF
Python for All
PPT
Python Programming ppt
PPTX
LingPy : A Python Library for Historical Linguistics
Machine Learning in Google I/O 19
Python: the Project, the Language and the Style
E Talevich - Biopython project-update
Talk6 biopython bosc2011
Biopython Project Update 2013
Python Course
Installing tensorflow object detection on raspberry pi
그렇게 커미터가 된다: Python을 통해 오픈소스 생태계 가르치기
Rust + python: lessons learnt from building a toy filesystem
A commercial open source project in Python
Introduction to Python for new beginner
10 popular software programs written in python
Python Introduction
Python Introduction
Python for Android
Extending Python - FOSDEM 2015
Python for All
Python Programming ppt
LingPy : A Python Library for Historical Linguistics
Ad

Similar to Time travel: Let’s learn from the history of Python packaging! (20)

PDF
Array computing and the evolution of SciPy, NumPy, and PyData
PDF
Python and Jupyter: Your Gateway for Learning
PDF
The quality of the python ecosystem - and how we can protect it!
PDF
Why Python is better for Data Science
PDF
A Whirlwind Tour Of Python
PDF
How OpenStack Makes Python Better (and vice-versa)
PPTX
Python Hype?
PDF
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
PDF
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
PPTX
Intro slides
PPTX
We19 Learn Python! Why and How
PDF
Programming for data science in python
PPTX
Python Meetup: The Origins
PPTX
PyCourse - Self driving python course
PDF
Everyone wants (someone else) to do it: writing documentation for open source...
PPTX
Intro Data science_pandas_Daslides .pptx
PDF
How to Contribute to Pinax
PDF
PyTorch for Delphi - Python Data Sciences Libraries.pdf
PDF
PySide
PDF
Knowledge Extraction for the Web of Things (KE4WoT) Challenge: Co-located wit...
Array computing and the evolution of SciPy, NumPy, and PyData
Python and Jupyter: Your Gateway for Learning
The quality of the python ecosystem - and how we can protect it!
Why Python is better for Data Science
A Whirlwind Tour Of Python
How OpenStack Makes Python Better (and vice-versa)
Python Hype?
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
Intro slides
We19 Learn Python! Why and How
Programming for data science in python
Python Meetup: The Origins
PyCourse - Self driving python course
Everyone wants (someone else) to do it: writing documentation for open source...
Intro Data science_pandas_Daslides .pptx
How to Contribute to Pinax
PyTorch for Delphi - Python Data Sciences Libraries.pdf
PySide
Knowledge Extraction for the Web of Things (KE4WoT) Challenge: Co-located wit...
Ad

More from Kir Chou (20)

PDF
Learn from LL(1) to PEG parser the hard way
PDF
Python パッケージの影響を歴史から理解してみよう!
PPTX
PyCon TW 2018 - A Python Engineer Under Giant Umbrella (巨大保護傘下的 Python 碼農辛酸史)
PPTX
Introduction of CTF and CGC
PPTX
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
PPTX
PPT
Spime - personal assistant
PPTX
Ch9 package & port(2013 ncu-nos_nm)
PPTX
Ch8 file system management(2013 ncu-nos_nm)
PPTX
Ch7 user management(2013 ncu-nos_nm)
PPTX
Ch10 firewall(2013 ncu-nos_nm)
PDF
Knowledge Management in Distributed Agile Software Development
PDF
Cms part2
PDF
Cms part1
PDF
Sitcon2014 community by server (kir)
PDF
Webapp(2014 ncucc)
PDF
廢除雙二一議題 保留方論點 (2013ncu全幹會)
PPTX
Ch6 ssh(2013 ncu-nos_nm)
PPTX
Ch5 network basic(2013 ncu-nos_nm)
PPTX
Ch4 vi editor(2013 ncu-nos_nm)
Learn from LL(1) to PEG parser the hard way
Python パッケージの影響を歴史から理解してみよう!
PyCon TW 2018 - A Python Engineer Under Giant Umbrella (巨大保護傘下的 Python 碼農辛酸史)
Introduction of CTF and CGC
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
Spime - personal assistant
Ch9 package & port(2013 ncu-nos_nm)
Ch8 file system management(2013 ncu-nos_nm)
Ch7 user management(2013 ncu-nos_nm)
Ch10 firewall(2013 ncu-nos_nm)
Knowledge Management in Distributed Agile Software Development
Cms part2
Cms part1
Sitcon2014 community by server (kir)
Webapp(2014 ncucc)
廢除雙二一議題 保留方論點 (2013ncu全幹會)
Ch6 ssh(2013 ncu-nos_nm)
Ch5 network basic(2013 ncu-nos_nm)
Ch4 vi editor(2013 ncu-nos_nm)

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
cuic standard and advanced reporting.pdf

Time travel: Let’s learn from the history of Python packaging!