Closed jameshilliard closed 3 years ago
Well for one pip install -e .
doesn't seem compatible with poetry
. Also from my understanding poetry
is really more designed to be used for the primary application being developed(ie homeassistant itself) rather than a library.
poetry install
installs all the library dependencies, development dependencies, and does the equivalent of pip install -e .
. Also it creates the virtual environment either in the local directory (how I've got mine setup) or in a poetry cache directory.
My workflow is:
git clone git@github.com:gwww/upb-lib.git
cd upb-lib
poetry install
source .venv/lib/activate
Then I can use the library for writing new code, running tests, etc, etc.
To create a new PyPi upload:
poetry build
poetry upload
Then I can use the library for writing new code, running tests, etc, etc.
So you can edit the library in place and run with updates without having to redo any sort of install step(like pip install .
, poetry install
or an equivalent)?
Correct.
What is the advantage of using
setup.py
over thepyproject.toml
? For me the advantage of usingpyproject.toml
is thatpoetry
handles it beautifully, creating a virtual envrionment, installing all the dependencies, creating builds, and uploading builds. All with very little fuss.pip
also supportspyproject.toml
although I have never tried using `pip that way.