Distributing program for Linux

Loris Bennett loris.bennett at fu-berlin.de
Wed Mar 15 03:37:18 EDT 2023


"Weatherby,Gerard" <gweatherby at uchc.edu> writes:

> It’s really going to depend on the distribution and whether you have root access.

I am interested in providing a package for people with root access for a
variety of distributions.

> If you have Ubuntu and root access, you can add the deadsnakes repo,
> https://launchpad.net/~deadsnakes, and install whatever Python you
> want.

I myself have this part covered via EasyBuild, https://easybuild.io/,
which will work on any distro.  How anybody else installs a given
version Python will be left as an exercise for them (potential users of
the software are however unlikely to be using Ubuntu).

> The default ‘python3’ remains but you can called a specific Python, (e.g. python3.10).
>
> A typical shebang line would be:
>
> #!/usr/bin/env python3.10

I am currently using poetry to build the package and uses a 'scripts'
section in the pyproject.toml file to produce stubs to call the main
program.  These have the shebang

  #!/usr/bin/python3

So if I can get poetry to use '/usr/bin/env' instead, then I can
probably just rely on whatever mechanism other people use to switch
between Python versions to do the right thing.

Cheers,

Loris

> From: Python-list <python-list-bounces+gweatherby=uchc.edu at python.org>
> on behalf of Loris Bennett <loris.bennett at fu-berlin.de>
> Date: Tuesday, March 14, 2023 at 12:27 PM
> To: python-list at python.org <python-list at python.org>
> Subject: Distributing program for Linux
> *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***
>
> Hi,
>
> If I write a system program which has Python >= 3.y as a dependency,
> what are the options for someone whose Linux distribution provides
> Python 3.x, where x < y?
>
> I am aware that an individual user could use (mini)conda to install a
> more recent version of Python in his/her home directory, but I am
> interested in how root would install such a program.
>
> Cheers,
>
> Loris
>
> --
> This signature is currently under constuction.
> --
> https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!l02A4qczH46l1ScA8yisiIwlDKh96sy16woPSOSABWqym4b6dBtHzExfFwZsnPDezDwDqaM0fdCMs3080WQQZ-b5OghOOpI$<https://urldefense.com/v3/__https:/mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!l02A4qczH46l1ScA8yisiIwlDKh96sy16woPSOSABWqym4b6dBtHzExfFwZsnPDezDwDqaM0fdCMs3080WQQZ-b5OghOOpI$>
-- 
Dr. Loris Bennett (Herr/Mr)
ZEDAT, Freie Universität Berlin


More information about the Python-list mailing list