Skip to content
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

Poetry based template #69

Closed
AntoineCezar opened this issue Jul 22, 2019 · 10 comments
Closed

Poetry based template #69

AntoineCezar opened this issue Jul 22, 2019 · 10 comments

Comments

@AntoineCezar
Copy link

Some time ago I've see this ticket Pylons/pyramid#3270 but I don't know what direction has been taken since.
I've made a poetry based template of the current master for myself. Is poetry desirable option for you?

@stevepiercy
Copy link
Member

I'm open to discussing it. I personally don't have any concerns about its adoption. @bertjwregeer, @mmerickel, and others on that issue discussion might have concerns and opinions.

If we were to adopt Poetry in the cookiecutter, then we would need to update the corresponding Pyramid docs as well. That's not a concern.

@mmerickel
Copy link
Member

I think it's going to depend on what poetry 1.0 ends up looking like. I have several issues with poetry based on using earlier versions and need to gain some confidence that it's going in a solid direction before personally agreeing to promote it.

@digitalresistor
Copy link
Member

I've been using it on a couple of projects, and the thing I really appreciate the most is its resolver for version dependencies and the ability to pin using lock files. That being said, I am not sure I want to support it in the documentation yet, even-though I also don't think pipenv or flit are good ideas either, so that would leave us with good ol' pip of which I am also not a huge fan.

Unfortunately more work needs to be done, and we aren't there yet :-(

@mmerickel
Copy link
Member

the cookiecutter is unlikely to take an opinion on this situation for a while - more than anything we're talking about removing any dependency manager at all, then maybe we add back an option to select between setuptools or poetry in the future

@bfmcneill
Copy link

Some time ago I've see this ticket Pylons/pyramid#3270 but I don't know what direction has been taken since.
I've made a poetry based template of the current master for myself. Is poetry desirable option for you?

Thanks! I couldn't figure out why my pserve was not working. I found some lines in your develop.ini file that fixed it. How did you figure out to make these changes?

@SuperSonicHub1
Copy link

@bfmcneill Sorry to awaken this long dead issue, but could you please share your config? I'm in the same boat as you.

@mmerickel
Copy link
Member

This came up in a pylons-discuss mailing list post as well and I constructed this pyproject.toml that works with the cookiecutter. There are no changes required in the INI file to work with this.

https://gist.github.com/mmerickel/33bc8edc633da132a8f92dbcb03ec1da

@SuperSonicHub1
Copy link

SuperSonicHub1 commented Jan 16, 2021

@mmerickel Thanks for the assist! For anyone that comes across this issue and wants clear instructions on how to get up and running with Pyramid without scaffolding:

  • add an app factory entry point to your pyproject.toml
[tool.poetry.plugins."paste.app_factory"]
main = "pyramid_scaffold:main"
  • Run poetry install to install your own package to your virtual environment
  • Make sure your INI points to your package:
[app:main]
use = egg:pyramid_scaffold

@bfmcneill
Copy link

@bfmcneill Sorry to awaken this long dead issue, but could you please share your config? I'm in the same boat as you.

looks like you solved it!

@zupo
Copy link

zupo commented Feb 11, 2023

I'm in the process of upgrading my stack to Pyramid 2 and SQLAlchemy 2 and I wanted to first see how it works on a simple tutorial. Since I like to use Poetry as well, I came to this issue. Happy to report that things seem to work!

A runnable example of a Pyramid 2 + SQLAlchemy 2 + Poetry scaffold is available on https://github.com/zupo/tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants