JnyJny / blynclight

Python bindings for the Embrava BlyncLight family of products.
Apache License 2.0
21 stars 3 forks source link

pip3 install in editable mode doesn't work #13

Closed petemyron closed 4 years ago

petemyron commented 4 years ago

I'm not sure if this is just python3, pip3, or whatever, but installing in editable mode fails:

➜ pip3 install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /Users/me/workspace/blynclight
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)

It installs fine without -e

pip3 version

➜ pip3 --version
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

python3 version

➜ python3 --version
Python 3.7.6
JnyJny commented 4 years ago

Looking at the README, I think I've spotted the source of the confusion: installing from the cloned repo.

The correction is:

$ python3 -m pip install .    # without the -e for editable

If you need the package to be editable, use the poetry development workflow:

$ python3 -m pip install poetry
$ cd /path/to/blynclight
$ poetry install
$ poetry shell

You can now modify files in the blynclight package and see those changes reflected in the behavior of the "installed" code.

Normal installation is unchanged:

$ python3 -m pip install -U blynclight
$ python3 -m pip install git+https://github.com/JnyJny/blynclight.git