[Slackbuilds-users] newer Python package building? (pip, setup.py becoming deprecated)

Jeremy Hansen jebrhansen+SBo at gmail.com
Thu Oct 31 05:14:09 UTC 2024


On Wed, Oct 30, 2024, 10:11 PM David Chmelik <davidnchmelik at gmail.com>
wrote:

> On 10/30/24 9:53 PM, Jeremy Hansen wrote:
> > On Wed, Oct 30, 2024, 9:49 PM <dchmelik at gmail.com
> > <mailto:dchmelik at gmail.com>> wrote:
> >
> >     Pip for Python may have existed 10+ years, but now some/many
> >     UNIX/GNU/Linux operating system distributions are saying 'setup.py is
> >     deprecated: use pip'.  The Python package I maintain (Mathics)
> >     doesn't
> >     even seem to install correctly with setup.py anymore since
> >     mid-to-late
> >     2010s.  Can we get a template to use pip, maybe with pip2tgz?
> >
> >
> > Have you looked at the python template?
> >
> > https://slackbuilds.org/templates/python-template.SlackBuild
> > <https://slackbuilds.org/templates/python-template.SlackBuild>
> I have it.
> > It includes the commands to build when a pyproject.toml file is
> > present. It will require at least python3-build among other possible
> > dependencies. [...]
> I don't know what that is, but I tried it and seems it'll work after I
> build dependencies.  I installed python3-setuptools-opt (v74) but
> mathics_scanner says it needs at least v70...
>

You need to follow the directions in the python3-setuptools-opt README,
which will have you set a variable in the SlackBuild requiring it to point
it to the python packages residing in /opt/, namely:

PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export PYTHONPATH=/opt/python$PYVER/site-packages

Jeremy

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20241030/6737a36f/attachment.htm>


More information about the SlackBuilds-users mailing list