sherlock
sherlock copied to clipboard
poetry packaging
Fixes #1241.
Here are the changes required to package this with Poetry. Feel free to use it or just base your own changes off of it.
Hey @stranger-danger-zamu, Could please explain the usage of this changes by example?! how we could run and use after this change?
Sorry! Github just popped this up in my feed.
For developers:
The pyproject.toml
file then allows the dev to build a python wheel:
git clone <github url> sherlock
cd sherlock
poetry install
poetry build
Then whoever from the sherlock project can just push the wheel up to PyPI to make it simple to install for end users. It's pretty simple with poetry, but it does require some configuration for the authentication (google poetry publish
for more info).
Also you don't need to install the wheel to run it in the local environment, just run the following command and it'll run the command using the source code:
poetry run sherlock
For end users:
If/When sherlock is pushed up to PyPI, then end users can just pip install -U sherlock
to install sherlock to their user directory so they can call sherlock as a command in the console (ie. sherlock
).
As for how that works it's just the tool.poetry.scripts
section in the pyproject.toml
file (link).
Essentially, the tool.poetry.scripts
section maps to the old setuptools' console_scripts feature.