pybind11
pybind11 copied to clipboard
DO NOT MERGE: trying out setuptools PR
Description
This is based on #3719.
See https://github.com/henryiii/pybind11/pull/9 too.
So far:
E - 'pybind11_global.egg-info/not-zip-safe',
is missing with the TOML config.
Thanks @henryiii, I will check!
Okay, that's weird, a single job has this:
AttributeError: module 'pybind11' has no attribute 'get_include'
I think it's related to the not-zip-safe issue, at least that's my guess. That's from pybind11-global, which is the weird legacy version that has "global" data and headers, rather than being inside a Python package.
Ok, I tried the following:
% PYBIND11_GLOBAL_SDIST=1 .python -m buildls dist
% ls dist
pybind11-2.10.0.dev1.tar.gz pybind11_global-2.10.0.dev1-py3-none-any.whl
and I noticed the names of the files produced... The sdist name does not contain _global...
I think this is caused by the fact that PEP 621 requires name to be statically defined in the pyproject.toml (so in theory trying to redefine it dynamically should not be an option).
The tar.gz file however does contain a not-zip-safe member:
% tar tf dist/pybind11-2.10.0.dev1.tar.gz | grep zip
pybind11-2.10.0.dev1/pybind11.egg-info/not-zip-safe
@henryiii, I think that for pybind11_global you will have to edit pyproject.toml before running the build 😅
E - 'pybind11_global.egg-info/not-zip-safe',is missing with the TOML config.
I added a test case for that in https://github.com/pypa/setuptools/pull/3068/commits/ed73bc52fde8d3106295f24b9a45dea8292374bd. Let's see what happens with the test suite, but running the tests locally the not-zip-safe file seems to be generated.
Ah, yes, I wasn't really expecting this to fully work with PEP 621 metadata, I was originally seeing if it would still work with the changes and the old system. The static name is correct. I'd be perfectly fine adding some sort of pre-processing system to make the global SDist.
I updated the PR to reflect the changes discussed in https://discuss.python.org/t/help-testing-experimental-features-in-setuptools/13821/59, regarding
the handling of license to better complain with PEP 621.