LeastAuthority / python-challenge-bypass-ristretto

Python bindings for Brave's challenge-bypass-ristretto library
4 stars 4 forks source link

macOS wheels fail to build due to `_DeprecatedInstaller` error and/or missing `setuptools_scm` configuration #58

Open crwood opened 3 days ago

crwood commented 3 days ago

As seen in https://github.com/PrivateStorageio/ZKAPAuthorizer/issues/472, attempting to build a wheel for python-challenge-bypass-ristretto on macOS 12 results in the following failure:

Building wheel for python-challenge-bypass-ristretto (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      /Users/distiller/project/venv/lib/python3.9/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      Traceback (most recent call last):
        File "/private/var/folders/df/bxz9cc217md0268__6llljk80000gn/T/pip-wheel-uu0e0i2l/python-challenge-bypass-ristretto_00dd3ec5382149478790bd9ee7351ec9/.eggs/setuptools_scm-8.1.0-py3.9.egg/setuptools_scm/_integration/pyproject_reading.py", line 36, in read_pyproject
          section = defn.get("tool", {})[tool_name]
      KeyError: 'setuptools_scm'
      running bdist_wheel
      running build
      running build_py
      creating build/lib
      creating build/lib/challenge_bypass_ristretto
      copying challenge_bypass_ristretto/__init__.py -> build/lib/challenge_bypass_ristretto
      creating build/lib/challenge_bypass_ristretto/tests
      copying challenge_bypass_ristretto/tests/__init__.py -> build/lib/challenge_bypass_ristretto/tests
      copying challenge_bypass_ristretto/tests/test_privacypass.py -> build/lib/challenge_bypass_ristretto/tests
      error: [Errno 2] No such file or directory: './challenge-bypass-ristretto-ffi'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-challenge-bypass-ristretto
  Running setup.py clean for python-challenge-bypass-ristretto
Successfully built zero-knowledge-access-pass-authorizer pyutil
Failed to build python-challenge-bypass-ristretto
ERROR: Failed to build one or more wheels

Exited with code exit status 1

Presumably this project's build process will need to be updated to work with whatever the latest Python packaging standard/trend is.