Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to pyproject.toml #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

branchvincent
Copy link

This project currently fails to build with pip's pep 517 build isolation (because setup.py imports from iOSbackup, which imports NSKeyedUnArchiver and won't be available):

Example

$ python3.12 -m venv .venv
$ .venv/bin/pip install --no-binary=iosbackup iosbackup
Collecting iosbackup
  Using cached iOSbackup-0.9.925.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/tmp.bvMiQnfu2C/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/tmp.bvMiQnfu2C/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/tmp.bvMiQnfu2C/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-build-env-mkpzx40y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-build-env-mkpzx40y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-build-env-mkpzx40y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-build-env-mkpzx40y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
        File "/private/var/folders/1r/p5nhsx151fd7j63p9r1zz4kw0000gn/T/pip-install-0397t0sk/iosbackup_14ad6c74c36b446dbc2daa557b9e42ad/iOSbackup/__init__.py", line 18, in <module>
          import NSKeyedUnArchiver
      ModuleNotFoundError: No module named 'NSKeyedUnArchiver'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

This migrates to static metadata instead via pyproject.toml (the modern replacement for setup.py)

$ python3.12 -m venv .venv
$ .venv/bin/pip install .
# ...
Successfully installed NSKeyedUnArchiver-1.5 iOSbackup-0.9.925 pycryptodome-3.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant