When using this package inside Alpine (most common Linux distribution for lightweight docker), the installation triggers build which fails:
user# pip install cffsubr
Collecting cffsubr
Downloading cffsubr-0.4.0.tar.gz (17.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.9/17.9 MB 3.9 MB/s 0:00:04
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting fontTools>=4.10.2 (from cffsubr)
Downloading fonttools-4.62.1-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (117 kB)
Downloading fonttools-4.62.1-cp312-cp312-musllinux_1_2_x86_64.whl (5.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 11.4 MB/s 0:00:00
Building wheels for collected packages: cffsubr
Building wheel for cffsubr (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for cffsubr (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [82 lines of output]
/tmp/pip-build-env-v_i0l9lb/normal/lib/python3.12/site-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
warn(
/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/version_inference.py:151: UserWarning: version of cffsubr already set
warnings.warn(f"version of {self.dist_name} already set")
/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: BSD License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-312/cffsubr
copying src/cffsubr/__init__.py -> build/lib.linux-x86_64-cpython-312/cffsubr
copying src/cffsubr/__main__.py -> build/lib.linux-x86_64-cpython-312/cffsubr
copying src/cffsubr/_version.py -> build/lib.linux-x86_64-cpython-312/cffsubr
running build_ext
/tmp/pip-install-1_90606n/cffsubr_2495a53dd414471da8c42f2e446be739/external/afdko/setup.py:7: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
from distutils.dep_util import newer
/tmp/pip-build-env-v_i0l9lb/normal/lib/python3.12/site-packages/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
warn(
/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:287: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/version_inference.py:151: UserWarning: version of afdko already set
warnings.warn(f"version of {self.dist_name} already set")
/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: Apache Software License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
Traceback (most recent call last):
File "/tmp/pip-install-1_90606n/cffsubr_2495a53dd414471da8c42f2e446be739/external/afdko/setup.py", line 222, in <module>
main()
File "/tmp/pip-install-1_90606n/cffsubr_2495a53dd414471da8c42f2e446be739/external/afdko/setup.py", line 172, in main
setup(name="afdko",
File "/tmp/pip-build-env-v_i0l9lb/normal/lib/python3.12/site-packages/skbuild/setuptools_wrap.py", line 611, in setup
dist = upstream_Distribution({"setup_requires": setup_requires})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, dist_attrs)
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 307, in __init__
self.finalize_options()
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 790, in finalize_options
ep(self)
File "/usr/local/lib/python3.12/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 192, in infer_version
_infer_version_impl(
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 225, in _infer_version_impl
result.apply(dist)
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/version_inference.py", line 123, in apply
data = infer_version_with_config(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/version_inference.py", line 67, in infer_version_with_config
_version_missing(config)
File "/tmp/pip-build-env-v_i0l9lb/overlay/lib/python3.12/site-packages/vcs_versioning/_get_version_impl.py", line 207, in _version_missing
raise LookupError(error_msg)
LookupError: setuptools-scm was unable to detect version for /tmp/pip-install-1_90606n/cffsubr_2495a53dd414471da8c42f2e446be739/external/afdko.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
Alternatively, set the version with the environment variable SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described in https://setuptools-scm.readthedocs.io/en/latest/config/
error: running '/usr/local/bin/python3.12 setup.py build --build-scripts build/bin' command failed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffsubr
Failed to build cffsubr
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> cffsubr
When using this package inside Alpine (most common Linux distribution for lightweight docker), the installation triggers build which fails: