tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: infrastructure change needed for python modules



On Thu, 25 Nov 2021 23:03:33 +0100
Thomas Klausner <wiz%netbsd.org@localhost> wrote:

> On Thu, Nov 25, 2021 at 06:09:26PM +0100, Benny Siegert wrote:
> > My impression is that the way to install Python packages these days
> > is to run "pip install" with appropriate options. Unfortunately,
> > that does everything in one call, from checking dependencies (you
> > probably need to prevent it from downloading unfulfilled ones) to
> > compiling and installing. I don't see a way to separate the build
> > and install phases when using pip.
> 
> The article I linked to suggested 'python -m build' for building,
> which doesn't do dependency checking.
> 
> I've also started a discussion about best practice here:
> 
>      https://discuss.python.org/t/bootstrap-suggestions/12202
> 
> Cheers,
>  Thomas

I don't really know how long you have come with this.
But I have an idea for wheel.mk . Allow pkgsrc to download
and extract platform independent wheels. These have filenames
following the pattern ${project}-${version}-py3-none-any.whl .
Like build[1] for example the has build-0.7.0-py3-none-any.whl .
They don't need building and can just be extracted to
${DESTDIR}${PREFIX}${sitepackages} and then packaged from what I
understand. I think this would also remove the circular dependecy
on tomli that Gorny mentions in his blog post since tomli 
also provides such files.
I plan to also provide pyproject.mk to use builds based on 
pyproject.toml and have wheels.mk install the wheels these create.
The files will be in wip/mk (or should it be wip/python?) and
moved to lang/python in pkgsrc-current after the freeze.
How does that sound for a plan?

Niclas Rosenvik

1: https://pypi.org/project/build/#files


Home | Main Index | Thread Index | Old Index