-
Notifications
You must be signed in to change notification settings - Fork 17
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
pyproject.toml: add initial file #328
Conversation
1399800
to
1244297
Compare
Add an initial pyproject.toml file to be able to build and install the api Python package. Thanks to Nikolay Yurin for finding the bug about the license file: https://github.com/pypa/pip/issues/12251 This project uses a standard license so it's better to just rely on the LGPL-2.1-or-later SPDX indentifier instead of providing the path to the whole license file. Development dependencies have been omitted and all the required dependencies have a fixed version in order to build reproducible Docker images for production deployment. Some follow-up changes can be made to have a better way to handle dependencies for development. Signed-off-by: Guillaume Tucker <[email protected]>
1244297
to
9ed5bb4
Compare
Thanks @yurinnick for finding the bug about the license file. I've now updated #329 accordingly to not install dependencies from |
Tested OK with the early access deployment. |
You can add optional dependencies as well:
And install it with |
Yes, I know. But as per the commit message:
I deliberately left the optional ones out as it's not required for the production deployment. Also, typically for development and in the project settings in general we should probably not pin down every package version, but it's necessary in order to reproduce the Docker images in production. So this is just a first step, and the development use-case will need to be addressed as a follow-up. |
Just to be on the same page, these dependencies won't go into production image, unless |
Yes, I know that too. But I don't think we should just add them like that and keep the required dependencies pinned down as it's not convenient for development. |
Got it! So you want to keep to unpinned and flexible for development, but pinned to production Docker image build. |
Yes I think that's the ideal case. That's why you'll see most of the pyproject files have a minimal version set but not a pinned one for each depdenency. I think the typical way to do this in the past has been to list the dependencies in setup.py without versions, but have requirements.txt with pinned versions. I'm not sure if we can do something nicer with pyproject now, like override the fixed version in a dev section. Alright I think we'll merge this and you can rebase your PR and address this kind if issues there if you want. |
Fixes: #326