gwww / upb-lib

Universal Powerline Bus library - interacts with UPB PIMs
MIT License
4 stars 2 forks source link

Switch to standard setuptools build. #1

Closed jameshilliard closed 3 years ago

gwww commented 4 years ago

What is the advantage of using setup.py over the pyproject.toml? For me the advantage of using pyproject.toml is that poetry handles it beautifully, creating a virtual envrionment, installing all the dependencies, creating builds, and uploading builds. All with very little fuss. pip also supports pyproject.toml although I have never tried using `pip that way.

jameshilliard commented 4 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.

gwww commented 4 years ago

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
jameshilliard commented 4 years ago

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)?

gwww commented 4 years ago

Correct.