Development installation with pyproject.toml/poetry?
Hi, I have converted my setup.py to pyproject.toml and use poetry to build/manage deps. I maintain packages which also have dependency packages and I frequently use development installations locally ("pip install -e ../my-dep") so to develop dependencies at the same time as my main packages. Q: With a pyproject.toml, can I enable some sort of development installation without also maintaining a setup.py - or is there a plan/PEP for enabling this without a setup.py? Right now, I have a setup.py which needs to stipulate a number of things which is already in my pyproject.toml. In particular, I find it a little bothering that I need to specify the entry_points/console_scripts in both the pyproject.toml and in setup.py. Kind regards, Fredrik
Hi Fredrik, You can do an editable install using whichever development tool you've chosen, e.g. Poetry. The poetry docs (https://python-poetry.org/docs/basic-usage/) say it does an editable install by default. Currently, there isn't a standardised way for 'frontend' tools like pip to ask for an editable install. Thomas On Wed, 1 Jul 2020, at 10:03, fredrik@averpil.com wrote:
Hi,
I have converted my setup.py to pyproject.toml and use poetry to build/manage deps. I maintain packages which also have dependency packages and I frequently use development installations locally ("pip install -e ../my-dep") so to develop dependencies at the same time as my main packages.
Q: With a pyproject.toml, can I enable some sort of development installation without also maintaining a setup.py - or is there a plan/PEP for enabling this without a setup.py?
Right now, I have a setup.py which needs to stipulate a number of things which is already in my pyproject.toml. In particular, I find it a little bothering that I need to specify the entry_points/console_scripts in both the pyproject.toml and in setup.py.
Kind regards, Fredrik -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/UJ6XS...
To supplement what Thomas said, yes, there is current some development effort in standardising development/editable installs. Much of the discussion happens here: https://discuss.python.org/t/next-steps-for-editable-develop-proof-of-concep...
On 01/7, 2020, at 17:15, Thomas Kluyver <thomas@kluyver.me.uk> wrote:
Hi Fredrik,
You can do an editable install using whichever development tool you've chosen, e.g. Poetry. The poetry docs (https://python-poetry.org/docs/basic-usage/) say it does an editable install by default.
Currently, there isn't a standardised way for 'frontend' tools like pip to ask for an editable install.
Thomas
On Wed, 1 Jul 2020, at 10:03, fredrik@averpil.com wrote:
Hi,
I have converted my setup.py to pyproject.toml and use poetry to build/manage deps. I maintain packages which also have dependency packages and I frequently use development installations locally ("pip install -e ../my-dep") so to develop dependencies at the same time as my main packages.
Q: With a pyproject.toml, can I enable some sort of development installation without also maintaining a setup.py - or is there a plan/PEP for enabling this without a setup.py?
Right now, I have a setup.py which needs to stipulate a number of things which is already in my pyproject.toml. In particular, I find it a little bothering that I need to specify the entry_points/console_scripts in both the pyproject.toml and in setup.py.
Kind regards, Fredrik -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/UJ6XS...
-- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/4HFFS...
Hi Thomas, After having read your email, I read up and realized that I can completely remove the setup.py file and rather than performing a development installation with pip, I use poetry. I can define the package in pyproject.toml using the path directive: https://python-poetry.org/docs/dependency-specification/#path-dependencies and then execute "poetry install". Thank you Thomas! š A side note; I am using nox and want to avoid running "poetry install" in every session, as this is very time consuming. Instead, I try to filter out the packages which needs to be installed for each session. Then I constrain this version to the poetry-managed version, as shown in the "Hypermodern Python" setup. However, this entails using pip with the --constrain option. And this sets me back once more with having pip in the equation. So, I am thinking of possible solutions for this problem and raised an issue here: https://github.com/cjolowicz/hypermodern-python/issues/115 If you have any input, please do let me know :) Kind regards, Fredrik
participants (4)
-
Fredrik Averpil
-
fredrikļ¼ averpil.com
-
Thomas Kluyver
-
Tzu-ping Chung