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

Can't build Python wrapper from source due to missing VERSION file #167

Open
hobofan opened this issue Nov 8, 2024 · 1 comment
Open

Comments

@hobofan
Copy link

hobofan commented Nov 8, 2024

When trying to build the Python package (as downloaded from PyPi, as package managers do), I get the following error (both via pip and uv):

Obtaining file:///Users/hobofan/Downloads/regopy-0.4.5
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "/Users/hobofan/.asdf/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/hobofan/.asdf/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/hobofan/.asdf/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/private/var/folders/8v/4hslx9cd01g3h9cxxdr3njpm0000gn/T/pip-build-env-91m6pnx2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 482, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/private/var/folders/8v/4hslx9cd01g3h9cxxdr3njpm0000gn/T/pip-build-env-91m6pnx2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/private/var/folders/8v/4hslx9cd01g3h9cxxdr3njpm0000gn/T/pip-build-env-91m6pnx2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/8v/4hslx9cd01g3h9cxxdr3njpm0000gn/T/pip-build-env-91m6pnx2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 319, in run_setup
          exec(code, locals())
        File "<string>", line 32, in <module>
      FileNotFoundError: [Errno 2] No such file or directory: '../../VERSION'
      [end of output]

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

The relevant part is:

      FileNotFoundError: [Errno 2] No such file or directory: '../../VERSION'

Which makes sense, as it is looking for the VERSION at the root of the repository (two directories up), which doesn't exist when the Python wrapper directory is individually packages.

I guess that is only rarely encountered, as there are built wheels for most platforms, but for some reason my Docker build wants to build it from source and runs into this 🤷

@matajoh
Copy link
Member

matajoh commented Dec 3, 2024

Thanks for bringing this to my attention! I will make the needed changes.

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

No branches or pull requests

2 participants