[LAD] installing python extensions

Marc Lavallée marc at hacklava.net
Thu Sep 22 19:01:18 CEST 2022


Le 2022-09-22 à 10 h 51, Fons Adriaensen a écrit :
> That was it, many thanks !
Yay!

> To it looked as if pip didn't know the bdist_wheel command, and indeed
> pip help-commands didn't include it. No indication at all that something
> else was missing...
>
> The relations and dependencies between the various python tools - pip,
> setup, wheel, ... remain a mistery to me, and there seems to be little
> up to date documentation. Examples all assume you want to make a package
> for the PPI and no other use cases...
The wheel package must be installed... it came after pip and setuptools, 
that both added support for wheel (not requiring it): 
https://peps.python.org/pep-0427/

I notice that audiotools is used by jacktools, so a requirement could be 
added to the setup function (in setup.py):

     install_requires=[
         "zita-audiotools >= 1.3.0",
     ],

Also, in order to create a valid source distribution, a MANIFEST.in file 
is required.
Here's a starting point:

global-exclude *.py[cod]
include Makefile
graft source

First line is to exclude bytecode files.
Second line is to include your (optional) Makefile (because it works).
Third line is to include all files from the source directory (including 
.h files).

More info:
https://docs.python.org/3/distutils/sourcedist.html

There's a newer packaging method that replace setup.py with a 
pyproject.toml file:
https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/

More info on wheels and distribution on pypi.org:
https://realpython.com/python-wheels/

The documentation is all over the place, and I'm also learning...

> With Archlinux you always (only) get the latest and greatest :-)
Latest version of Python is 3.10.7, so 3.10.5 is behind by two patch 
versions. ;-)

Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.linuxaudio.org/archives/linux-audio-dev/attachments/20220922/27f1bcfc/attachment.html>


More information about the Linux-audio-dev mailing list