tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Python packages without setup.py
On Mon, 10 Jan 2022 20:54:28 +0100
Adam <adam%netbsd.org@localhost> wrote:
> Some recent Python packages do not distribute setup.py, but rely on
> other tools to build and package.
>
> Here are the steps I've taken to generate setup.py for PkgSrc using
> devel/py-flit.
>
>
> cd ${WRKSRC}
> flit-3.10 build --format sdist --setup-py
> bsdtar --strip-components 1 -zxvf dist/*.tar.gz '*/setup.py'
> sed -i '' -e '/generated by flit/d' -e 's,distutils.core,setuptools,'
> setup.py
>
>
> Copy setup.py to ${FILESDIR}/setup.py
>
>
> Add these to Makefile:
>
> # Important: Re-generate files/setup.py on update.
>
> pre-configure:
> ${CP} ${FILESDIR}/setup.py ${WRKSRC}/
>
>
> I used this method on py-flit_core, py-flit, py-tomli, and py-tomli_w.
>
> I know it's a little bit messy and only applies to packages using
> Flit as a tool in pyproject.toml.
>
> Kind regards,
> Adam
We already have support building using pyproject.toml in wip, I just
tried building your mention packages using this and it works very well.
Will add wheel.mk to pkgsrc-current tomorrow.
Regards,
Niclas
Home |
Main Index |
Thread Index |
Old Index