The team members complained that Pipenv's lock wasn't over yet ... I will move to Poetry, which seems to solve this problem!
It is a story.
It's a story you often see: smiley:
--There is a private PyPI index server
--Do not change the version description method
--Moving packages
and dev-packages
respectively
--Move if you can script
poetry # 1701 and poetry # 663 When you look at it There seems to be a dephell or one-liner method, It didn't feel like meeting the above assumptions.
So I made a tool called pipenv-poetry-migrate: tada: I don't have a test because it feels like I've hit it, but I'll write it in the future: bow:
poetry
, pipenv-poetry-migration
Install poetry
using the officially recommended method (https://python-poetry.org/docs/#installation).
Install pipenv-poetry-migration
with the following command.
$ pip install -U pipenv-poetry-migration
pyproject.toml
First, create pyproject.toml
to move to.
$ poetry init
Leave the dependent packages empty by answering no
.
$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml
Nothing is output, but dependent packages, scripts, etc. are moved to pyproject.toml
.
$ poetry lock
Even if you're using a private PyPI index server, it should work because the settings have been moved.
It may fail if there is a pre-release
package. In that case, modify pyproject.toml
.
$ poetry install
If it ends normally, the construction of the virtual environment is completed.
There are other moves besides Pipfile.
Is it around here? Don't forget to edit it. I think that this will change depending on the state of the project and repository, so I will fold it: bow:
I think there are various pros and cons, but it was one of the various methods.
If you like pipenv-poetry-migrate, I hope you will continue to use it. We are also waiting for miscellaneous issues, PR, etc.!
Recommended Posts