With setuptools, I could use python3 setup.py develop
and my development directory could be found by python3 without setting PYTHONPATH or running install. Any change in the current development directory is immediately available without running python3 setup.py develop/install
again. This saves quite a lot of time during the development.
Is there a poetry equivalent?
Update There is a feature request https://github.com/python-poetry/poetry/issues/1214
You can add other poetry and setup.py managed project as dependencies in development mode with poetry add ../relative_path/to/package_folder. Installing a poetry managed project - or better: any project managed by pyproject.
Poetry requires Python 2.7 or 3.5+. It is multi-platform and the goal is to make it work equally well on Windows, Linux and OSX. Python 2.7 and 3.5 will no longer be supported in the next feature release (1.2). You should consider updating your Python version to a supported one.
py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. I found a very detailed write-up explaining this issue: "Why you shouldn't invoke setup.py directly" (October 2021).
Poetry is a dependency management tool in Python projects (analogous to the built-in pip). It will be vital for beginners in Python to get acquainted with this tool, as it is a very simple and easy-to-use tool, the use of which can simplify the management and development of the project.
In poetry, the main project is installed as editable by default:
The current project is installed in editable mode by default.
-- Section "Installing dependencies only" of Poetry's documentation
It is also possible to install some dependencies as editable alongside the main project in the same virtual environment. For example:
[tool.poetry.dependencies]
Library = { path = "../Library/", develop = true }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With