@ben_nuttall
Running a Python Package Index for
Raspberry Pi
Slide 2
Slide 2 text
@ben_nuttall
Ben Nuttall
●
Senior Software Engineer, BBC
News Labs
●
Former Community Manager at
Raspberry Pi
●
Based in Cambridgeshire, UK
●
bennuttall.com
●
twitter.com/ben_nuttall
●
github.com/bennuttall
Slide 3
Slide 3 text
@ben_nuttall
Pure Python package
Binary distribution (bdist) .whl
Source distribution (sdist)
.zip
.tar.gz
Slide 4
Slide 4 text
@ben_nuttall
Compiled Python package
Python
version
3.5 3.6 3.7 3.8 3.9
Windows (win32)
Windows (amd64)
Mac OS (x86_64)
Linux (i686)
Linux (x86_64)
Source (sdist)
Slide 5
Slide 5 text
@ben_nuttall
pip
Slide 6
Slide 6 text
@ben_nuttall
pip
Slide 7
Slide 7 text
@ben_nuttall
What is piwheels?
●
Open source project maintained by:
–
Ben Nuttall
–
Dave Jones
●
Tooling to automate building wheels of everything on PyPI
–
Wheels are pre-compiled binary distributions of Python
packages
●
Pip-compatible index (PEP-503)
–
Can be used by pip as an "extra index" alongside PyPI
●
Tailored towards the Arm platform
–
linux_armv6l and linux_armv7l platform tags
@ben_nuttall
Following PyPI’s event log
●
We care about:
–
Package creation/deletion
–
Version creation/deletion
–
Source distribution upload/removal
–
Yank/Unyank version
●
Update database
●
Add builds to queue
●
Remove files
●
Rewrite web pages as necessary
Slide 14
Slide 14 text
@ben_nuttall
piwheels build queue
Slide 15
Slide 15 text
@ben_nuttall
Using piwheels
●
Raspberry Pi OS is pre-
configured to use piwheels.org
as an additional index to PyPI
●
Users get platform wheels
without knowing it’s there
Slide 16
Slide 16 text
@ben_nuttall
Using piwheels
●
Raspberry Pi OS is pre-
configured to use piwheels.org
as an additional index to PyPI
●
Users get platform wheels
without knowing it’s there
Slide 17
Slide 17 text
@ben_nuttall
Stats
Slide 18
Slide 18 text
@ben_nuttall
Static site build
●
Once/periodically:
–
Homepage & single pages
●
When changed:
–
Simple index
–
Package simple index (create, update and delete)
–
Package project page (create, update and delete)
–
Wheel files (create and delete)
@ben_nuttall
JSON API
●
piwheels.org/project//json
–
Info about a specific package (versions, builds, files, etc)
●
piwheels.org/packages.json
–
List of all packages, with per-package download stats
Slide 26
Slide 26 text
@ben_nuttall
Package issues
Slide 27
Slide 27 text
@ben_nuttall
Package issues
Slide 28
Slide 28 text
@ben_nuttall
Package issues
Slide 29
Slide 29 text
@ben_nuttall
Running a Python Package Index for
Raspberry Pi