python-poetry / python-poetry/poetry
Installing plugin as dist or local path into Poetry's environment
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: Windows 10
- Poetry version: 1.2.0
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
There does not appear to be a way to install a custom plugin locally without involving PyPi. I've tried the following commands:
Within the plugin directory:
poetry self add <plugin name>
Result:
'NoneType' object has no attribute 'startswith'
Within the dist directory after building:
poetry self add <wheel file>
Result:
Could not parse version constraint: <wheel file>
I have been able to work around this by using the system pip to install the plugin, but this is an ugly workaround for an issue that makes testing incredibly difficult.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the poetry self add <plugin name> command from the plugin directory and with a built wheel from its dist directory, using the reported Poetry 1.2.0 environment. Trace how poetry self add parses these inputs. Done means a local plugin directory or wheel can be installed without PyPI and the reported errors no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100