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

Allow repo to be installed with pip #244

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

Conversation

yuvipanda
Copy link

This tells poetry's masonry build backend to look for the package under src/ (based on the poetry
docs
. Without this, trying to install
this package with just pip from the repo fails with:

$ pip install .
Processing /Users/yuvipanda/code/jupyter-remote-desktop-proxy/images/qgis/qgis-stac-plugin
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "/Users/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/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/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 42, in prepare_metadata_for_build_wheel
          builder = WheelBuilder(poetry)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 61, in __init__
          super().__init__(poetry, executable=executable)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/builder.py", line 85, in __init__
          self._module = Module(
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/utils/module.py", line 69, in __init__          raise ModuleOrPackageNotFound(
      poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package qgis-stac-plugin
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This tells poetry's masonry build backend to look for
the package under `src/` (based on [the poetry
docs](https://python-poetry.org/docs/pyproject/#packages)
. Without this, trying to install
this package with just pip from the repo fails with:

```
$ pip install .
Processing /Users/yuvipanda/code/jupyter-remote-desktop-proxy/images/qgis/qgis-stac-plugin
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "/Users/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/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/yuvipanda/.local/share/virtualenvs/qgis-stac-plugin/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 42, in prepare_metadata_for_build_wheel
          builder = WheelBuilder(poetry)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 61, in __init__
          super().__init__(poetry, executable=executable)
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/builder.py", line 85, in __init__
          self._module = Module(
        File "/private/var/folders/p4/gnx7h_mj73v92nj_v93475v80000gn/T/pip-build-env-jhnlomhc/overlay/lib/python3.10/site-packages/poetry/core/masonry/utils/module.py", line 69, in __init__          raise ModuleOrPackageNotFound(
      poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package qgis-stac-plugin
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
```
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.

2 participants