tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Python packages without setup.py
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
Home |
Main Index |
Thread Index |
Old Index