Closed MatthewRalston closed 1 year ago
Hi @MatthewRalston , I suspect that in order for the .pyx
files to be included in the sdist (and therefore be available when building the wheel) you need to either use a plugin for the automatic inclusion (e.g. setuptools-scm
) or configure MANIFEST.in
manually.
Does it work when you try one of these 2 alternatives?
Hi @MatthewRalston , I suspect that in order for the .pyx
files to be included in the sdist (and therefore be available when building the wheel) you need to either use a plugin for the automatic inclusion (e.g. setuptools-scm
or configure MANIFEST.in
manually.
Does it work when you try one of these 2 alternatives?
Just to clarify, you still need setup.py
to define your ext_modules
. The only thing that setuptools will automatically do is convert .pyx
to .c
first or (in the case the .pyx
files are not present, use the pre-existing .c
ones.
You can put all the declarative configuration in pyproject.toml
and leave only the ext_modules
part in setup.py
That mostly solved this problem. Now auditwheel and twine are complaining about the .whl
archive validity from the build toolchain. I'll make a new issue.
OS version
Arch 6.0.12
Python version
3.10.1
Pip version
22.3.1
Guide link
https://setuptools.pypa.io/en/latest/userguide/ext_modules.html
Problem description
Migration from
setup.py
topyproject.toml
has impacted my Cython extension packaging process.I am using the guide above, which says
pyproject.toml
automagically discovers.pyx
files. I am unwilling to Cythonize during build time and check the.c
files into vcs directly. I'd prefer some help with the correct discovery of.pyx
files.Currently,
python -m build
produces a WHEEL file without my.pyx
files. I can confirm that thesdist
also does not include the.pyx files.
My pyproject.toml