An overview of Python packaging history, with details of what PEP 517 is, some of the new tools using it, and how you might write a PEP 517 backends and frontends.
See also notes taken by an attendee: https://twitter.com/drakekin/status/1173195932151746561
10. Solutions – wheels
1994: Python 1.0
2019: Python 3.8
2000: Python 2.0 & distutils
2004: Setuptools
2008: pip 2013: wheels
2016: manylinux1 wheels
2016: PEP 518
2017: PEP 517
2003: PyPI
2007: virtualenv
●
No script to run
●
Pre-built binaries
●
For Linux from 2016
●
Flit (2015)
●
All you need are wheels
20. Enscons
●
Scons build
system
●
Good for
compiled
code
extension = env.SharedLibrary(
target=ext_filename,
source=[
"crypt_blowfish-1.2/crypt
"crypt_blowfish-1.2/crypt
"crypt_blowfish-1.2/wrapp
"cryptacular/bcrypt/_bcry
],
LIBPREFIX="",
SHLIBSUFFIX=SHLIBSUFFIX,
CPPPATH=["crypt_blowfish-1.2"
CPPFLAGS=["-D__SKIP_GNU"],
21. Make your own backend
●
4 key functions
– build_sdist / _wheel
– get_requires_for_build_sdist / _wheel
●
Can extend another backend, e.g. flit,
setuptools
22. Make your own frontend
Use the pep517 library!
Why?
●
Repackaging, e.g. rpm, installers, Spack
●
Build packages in docker containers
●
Reproducible builds?
23. Thank-you
Thomas Kluyver
thomas@kluyver.me.uk – takluyver (GitHub/GitLab)
Thanks to:
Nathaniel Smith, Robert Collins, Nick Coghlan, Daniel
Holth, Donald Stufft, Paul Moore
& many other people