w ho
play

W HO ? Pradyun Gedam @pradyunsg pradyunsg.me Member of Python - PowerPoint PPT Presentation

P YTHON P ACKAGING Where we are Where were headed gg.gg/pycon-in-2019 @pradyunsg W HO ? Pradyun Gedam @pradyunsg pradyunsg.me Member of Python Packaging Authority Maintainer of pip, virtualenv, packaging and more PSF


  1. P YTHON P ACKAGING Where we are 
 Where we’re headed gg.gg/pycon-in-2019 @pradyunsg

  2. W HO ? Pradyun Gedam 
 @pradyunsg pradyunsg.me Member of 
 Python Packaging Authority Maintainer of 
 pip, virtualenv, packaging and more PSF Fellow College student!

  3. W HERE W E A RE An Overview of Tooling in the Python Packaging ecosystem

  4. N OT H OW WE GOT HERE https:/ /www.youtube.com/watch?v=AQsZsgJ30AE

  5. W HAT ’ S P ACKAGING ?

  6. 
 Medium for 
 Moving Packages Package Package Thing Thing

  7. S OFTWARE D ISTRIBUTION

  8. "Moving" Software Distribution Distribution Source Code Working Software

  9. S OFTWARE D ISTRIBUTION A N U NSOLVED P ROBLEM https:/ /youtu.be/IVzjVqr_Bzs?t=430

  10. "Moving" Software Distribution Distribution Source Code Working Software

  11. Publisher User "Moving" Software Distribution Distribution Source Code Working Software

  12. Publisher Source Code

  13. Publisher Distribution "build" Source Code

  14. Publisher - Build a Distribution from 
 Source Code Distribution - Build Environment - Build Mechanisms "build" Source Code

  15. Publisher "Moving" Software Distribution "build" Source Code

  16. Publisher "Moving" Software "upload" Distribution "build" Source Code

  17. Publisher "Moving" Software "upload" Distribution - Upload the Distribution "build" - Upload Mechanisms Source Code

  18. User "Moving" Software

  19. User "Moving" Software Distribution

  20. User "Moving" Software "download" Distribution

  21. User "Moving" Software "download" Distribution - Download the Distribution - Download Mechanisms - Choosing what to download

  22. User "Moving" Software "download" Distribution Working Software

  23. User "Moving" Software "download" Distribution "install" Working Software

  24. User "Moving" Software "download" Distribution - Install from the Distribution - Install Environment "install" - Install Mechanisms Working Software

  25. Publisher User "Moving" Software "upload" "download" Distribution Distribution "build" "install" Source Code Working Software

  26. Publisher User "Moving" Software "upload" "download" Distribution Distribution

  27. Publisher User Distribution Distribution "build" "install" Source Code Working Software

  28. D EALING WITH E NVIRONMENTS • The Packaging Gradient 
 https:/ /sedimental.org/the_packaging_gradient.html 
 https:/ /www.youtube.com/watch?v=iLVNWfPWAC8 • Python Packaging Overview 
 https:/ /packaging.python.org/overview/

  29. P Y PA T OOLING Tools built by volunteers

  30. 
 Built on standards (mostly) 
 https:/ /packaging.python.org/speci fi cations/

  31. Package Index Interfaces Publisher User Python Package Index "upload" "download" Distribution Distribution

  32. Package Distribution Metadata Publisher User Distribution Distribution "build" "install" Source Code Working Software

  33. W E WENT TOO FAR ONCE . • PEP 426 - Metadata 2.0 • Was trying to solve all the problems with Python’s metadata. Never became a reality. • Incremental Improvements • Our current, softer approach — workable approach with volunteers.

  34. Publisher - Usually setuptools - PEP 517 and PEP 518 Distribution - "modern" source distributions build 
 backend - pyproject.toml Source Code

  35. Publisher PyPI twine Distribution

  36. User PyPI pip Distribution virtualenv 
 pip venv Working Software

  37. It’s not that straightforward.

  38. Publisher User PyPI twine pip Distribution Distribution virtualenv 
 setuptools pip venv Source Code Working Software

  39. User pip via 
 PyPI pipenv Distribution pipenv Working Software

  40. NON -P Y PA T OOLING Tools built by companies or different volunteers.

  41. Environments are dif fi cult.

  42. Publisher - Simpli fi es the "build" experience Distribution - Metadata in pyproject.toml fl it Source Code

  43. User Distribution pex Working Software

  44. User Distribution pipx Working Software

  45. Publisher User PyPI poetry poetry Distribution Distribution poetry poetry Source Code Working Software

  46. Publisher User Conda Channels conda conda Conda Packages Conda Packages conda conda Source Code Working Software

  47. "… all of this stuff is really hard and 
 there’s a lot of knowledge scattered around in people’s heads that could really do with being captured somewhere" — P AUL M OORE

  48. W HERE W E ’ RE H EADED Future Improvements in Python Packaging

  49. I DON ’ T HAVE 
 A TIME MACHINE .

  50. C ORE F UNCTIONALITY I MPROVEMENTS ongoing • securing PyPI — The Update Framework (TUF) • newer manylinux standards — manylinux2014 • yanking packages from PyPI • better licensing metadata

  51. C ORE F UNCTIONALITY I MPROVEMENTS soon? • structured lock fi les in pip • package preview functionality from PyPI • security noti fi cations for vulnerable packages • pip dependency resolver

  52. B ETTER U SER E XPERIENCE • better defaults in pip • feature fl ags on PyPI • interoperability testing • professional UX review

  53. R EDUCING T ECHNICAL D EBT • virtualenv rewrite • making the transition from distutils -> setuptools • pip build logic refactor • pip "working schemes" cleanup • change the right environments

  54. M OAR S TANDARDISATION • editable installations • better, more powerful, extras • less ambiguous licensing • interoperability with other package managers

  55. H OW DO WE GET THERE ? • Volunteer! • Tell us how you deal with "interesting" issues. • Fund one of the targeted funded projects.

  56. Thank you! \o/

Recommend


More recommend