3 ms·
Reposting this from the "is Pipenv dead?" thread: We love DepHell. I migrated some work repos from Pipenv (and plain ol' pip) to Poetry. However, we didn't wan
by kstrauser 7y ago
Reposting this from the "is Pipenv dead?" thread:
We love DepHell. I migrated some work repos from Pipenv (and plain ol' pip) to Poetry. However, we didn't want to have a flag day where we updated our build tooling to be 100% Poetry, so I made a Makefile target that builds requirements.txt and setup.py from pyproject.toml. Now developers can work with pleasant tooling, but the build system can use the old stuff it already knows.
We're close to having everything migrated to Poetry. When that day comes, we can throw out all the compatibility stuff, update the build server, and be happy. Until that day, DepHell gives us an easy compatibility layer so that we don't have to do the migration all at once. It's awesome.
- BerislavLopac 7y agoI'm curious -- are you using Poetry for applications, besides just the libraries? If so, what is your workflow? I'm currently setting up some workflows with Poetry so I'm keen to learn of others' experiences.
- kstrauser 7y agoWe are. pyproject.toml is now our official record of dependencies, command-line scripts, etc. for all recently-touched repos. We've updated most built tooling to use `poetry install` instead of `pip install -r requirements.txt`. In places where we haven't yet, we have Makefile targets like: # Generate setup.py and requirements.py until we can get off that treadmill. # This *must* be done every time you update dependencies, as pyproject.toml is # now the official source of project configuration and packages. python_oldfiles: dephell deps convert; dephell deps convert --env requirements and pyproject.toml blocks: [tool.dephell.main] from = {format = "poetry", path = "pyproject.toml"} to = {format = "setuppy", path = "setup.py"} [tool.dephell.requirements] from = {format = "poetry", path = "pyproject.toml"} to = {format = "pip", path = "requirements.txt"} Now when a dev does `poetry add foo`, they can run `make python_oldfiles` to autogenerate updated "compatibility" files.