Allow repo to be installed with pip#244
Open
yuvipanda wants to merge 1 commit intostac-utils:mainfrom
Open
Conversation
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. ```
vincentsarago
approved these changes
Apr 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tells poetry's masonry build backend to look for the package under
src/(based on the poetrydocs . Without this, trying to install
this package with just pip from the repo fails with: