-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try out Pipenv #327
Try out Pipenv #327
Conversation
Please consider Poetry as well. Some references to help in your research: |
4ec0f84
to
30b20dc
Compare
65f5116
to
a171900
Compare
75792c7
to
7b6c4b0
Compare
852bc02
to
f942358
Compare
I did consider poetry. I don't think there's much difference between the tools for this use case and I've just had more experience with pipenv, which has worked very well for my lektor projects. |
@yagebu I do think this is the way of the future. Much cleaner, more stable. Great work. We should almost definitely work on moving Lektor out of the package management business and in this direction. Because of backward compatibility concerns, we'll probably first have to deprecate Lektor's plugin management facilities, and update Lektor's documentation to describe and recommend doing things without using Lektors plugin management: i.e. using pipenv (or poetry, or plain old pip) to manage a virtualenv for each Lektor project. Before we've done that, my gut feeling is that we should be eating our own dog food here. It's good to have |
fd89fbe
to
dc281da
Compare
and instead of Lektor's automatic installation install them with pipenv to get proper locking of all dependencies.
FWIW, I am now managing all of the Lektor sites (and most of my Python projects, in general) with PDM. It's working very well for me. PDM has matured to the point where I think it works very well. PDM is a generation more developed that pipenv, so supports things like scripts, dev requirements, etc. pretty well. E.g. from a clean clone of a project repo, when properly configured, all that is necessary is: # create venv, install requirements (from pdm.lock)
pdm install
# run the `server` script, defined in pyproject.toml, e.g. `lektor server`
pdm server There is a github action that makes use of PDM in Github workflows straightforward. For me, PDM has advantages over poetry in that it's more recent, so more standards-based (e.g. PEP 621 support). It is under active maintenance and development. And it makes more sense to me — for whatever reason, I can figure out the appropriate PDM command to accomplish a task easier than with poetry.
|
Closing this one, I'm not motivated to follow up on this one. I'm not using pipenv myself anymore to manage my Lektor environments, rather I'm just using plain old virtualenvs (using uv for speed). Not against using PDM instead. |
This is an attempt to see if pipenv can be a safer alternative to using Lektor's builtin plugin mechanism to build the site.
Edit: I've personally been using pipenv for a while now for my personal Lektor projects and it's been a joy to use (just like poetry would be as well I guess). I know my dependencies are locked and will work unless I explicitly try to upgrade. I think the same would work well for this repo - these updates could be automated with dependabot or renovate.