The following is on openSUSE Leap 15.6 using locally installed Python 3.12, with locally installed
pip==26.0.1
setuptools==82.0.0
I downloaded and unpacked types-cffi latest version 2.0.0.20260315 and tried to pip install from the source code
/usr/local/bin/pip3.12 install /usr/src/build/types_cffi-2.0.0.20260315/ --no-binary all --no-build-isolation --no-cache-dir --no-deps --no-index --no-warn-script-location --progress-bar off --root "/usr/local/stow/Languages/Python_312/types-cffi_312-2.0.0.20260315" --verbose
resulting in numerous warnings about
SetuptoolsDeprecationWarning: Invalid dash-separated key 'install-base'
and then a fatal error
ValueError: invalid pyproject.toml config: `tool.setuptools.package-data`.
configuration error: `tool.setuptools.package-data` keys must be named by:
at least one of the following:
- {type: string, format: 'python-module-name'}
- {predefined value: '*'}
This is caused by setuptools not yet permitting the use of hyphens in the [tool.setuptools.package-data] section of the pyproject.toml as reported in the PyPa setuptools issue pypa/setuptools#4772 of December 2024.
If I change the hyphens in the names of the source sub-directories to _cffi_backend_stubs and cffi_stubs to underscores and change the entries at the very end of the pyproject.toml grom hyphens to underscores viz
[tool.setuptools]
packages = ['_cffi_backend_stubs', 'cffi_stubs']
include-package-data = false
[tool.setuptools.package-data]
'_cffi_backend_stubs' = ['__init__.pyi', 'METADATA.toml', 'py.typed']
'cffi_stubs' = ['__init__.pyi', 'api.pyi', 'backend_ctypes.pyi', 'cffi_opcode.pyi', 'commontypes.pyi', 'cparser.pyi', 'error.pyi', 'ffiplatform.pyi', 'lock.pyi', 'model.pyi', 'pkgconfig.pyi', 'recompiler.pyi', 'setuptools_ext.pyi', 'vengine_cpy.pyi', 'vengine_gen.pyi', 'verifier.pyi', 'METADATA.toml', 'py.typed']
then the pip install still gives the deprecation warnings but no longer encounters the fatal error and the module is successfully built and installed.
The following is on openSUSE Leap 15.6 using locally installed Python 3.12, with locally installed
pip==26.0.1
setuptools==82.0.0
I downloaded and unpacked types-cffi latest version 2.0.0.20260315 and tried to pip install from the source code
resulting in numerous warnings about
and then a fatal error
This is caused by setuptools not yet permitting the use of hyphens in the [tool.setuptools.package-data] section of the pyproject.toml as reported in the PyPa setuptools issue pypa/setuptools#4772 of December 2024.
If I change the hyphens in the names of the source sub-directories to _cffi_backend_stubs and cffi_stubs to underscores and change the entries at the very end of the pyproject.toml grom hyphens to underscores viz
then the pip install still gives the deprecation warnings but no longer encounters the fatal error and the module is successfully built and installed.