[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-audio-dev
Subject:    Re: [LAD] installing python extensions
From:       Marc_Lavallée <marc () hacklava ! net>
Date:       2022-09-22 16:58:12
Message-ID: c92316ba-0935-ea96-828b-118056d6214d () hacklava ! net
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Le 2022-09-22 à 10 h 51, Fons
      Adriaensen a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:20220922145118.qxhurynuvau5d2tr@mail1.linuxaudio.cyso.net">
      <pre class="moz-quote-pre" wrap="">That was it, many thanks !</pre>
    </blockquote>
    Yay!<br>
    <br>
    <blockquote type="cite"
      cite="mid:20220922145118.qxhurynuvau5d2tr@mail1.linuxaudio.cyso.net">
      <pre class="moz-quote-pre" wrap="">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...
</pre>
    </blockquote>
    The wheel package must be installed... it came after pip and
    setuptools, that both added support for wheel (not requiring it):
    <a class="moz-txt-link-freetext" \
href="https://peps.python.org/pep-0427/">https://peps.python.org/pep-0427/</a><br>  \
<br>  I notice that audiotools is used by jacktools, so a requirement
    could be added to the setup function (in setup.py):<br>
    <br>
        install_requires=[<br>
            "zita-audiotools &gt;= 1.3.0",<br>
        ],<br>
    <br>
    Also, in order to create a valid source distribution, a MANIFEST.in
    file is required.<br>
    Here's a starting point:<br>
    <br>
    global-exclude *.py[cod]<br>
    include Makefile<br>
    graft source<br>
    <br>
    First line is to exclude bytecode files.<br>
    Second line is to include your (optional) Makefile (because it
    works).<br>
    Third line is to include all files from the source directory
    (including .h files).<br>
    <br>
    More info:<br>
    <a class="moz-txt-link-freetext" \
href="https://docs.python.org/3/distutils/sourcedist.html">https://docs.python.org/3/distutils/sourcedist.html</a><br>
  <br>
    There's a newer packaging method that replace setup.py with a
    pyproject.toml file:<br>
    <a class="moz-txt-link-freetext" \
href="https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/">https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/</a><br>
  <br>
    More info on wheels and distribution on pypi.org:<br>
    <a class="moz-txt-link-freetext" \
href="https://realpython.com/python-wheels/">https://realpython.com/python-wheels/</a><br>
  <br>
    The documentation is all over the place, and I'm also learning...<br>
    <br>
    <blockquote type="cite"
      cite="mid:20220922145118.qxhurynuvau5d2tr@mail1.linuxaudio.cyso.net">
      <pre class="moz-quote-pre" wrap="">With Archlinux you always (only) get the \
latest and greatest :-)</pre>  </blockquote>
    Latest version of Python is 3.10.7, so 3.10.5 is behind by two patch
    versions. ;-)<br>
    <br>
    Marc<br>
    <br>
    <div id="grammalecte_menu_main_button_shadow_host" style="width:
      0px; height: 0px;"></div>
  </body>
</html>


[Attachment #6 (text/plain)]

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic