-
Notifications
You must be signed in to change notification settings - Fork 342
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
WIP: Use poetry for dependency management #552
Conversation
Does poetry support pypa/pip#8085? This is the main feature I feel like pip is missing, and would allow us to test both the latest version and historical versions so that the minimum pins stay up to date. |
See python-poetry/poetry#3527. In the past, I have used a hacky solution which is to find-and-replace the |
Silences errors about `<debug>PackageInfo:</debug> Invalid constraint (importlib-metadata (>='4.4') ; python_version < "3.10") found in markdown-3.3.5 dependencies, skipping`.
If this PR is ever going to be merged, I'm going to need to see a clear and concise argument for why poetry is better than setuptools, flit, etc. If I was going to replace setuptools, I was actually thinking flit since it's simpler and designed for pure-Python packages like TorchGeo. But at the moment, setuptools seems to be the most stable and widely used build backend, and is used by the rest of the PyTorch community. All PyPA packaging guides still recommend using setuptools and pip for projects, and it's much easier to find support for these since they've been around longer. I do really like poetry's |
One complaint I have with setuptools is that dependabot requires us to use a single |
Let's revisit this another time perhaps, I'm having trouble getting |
I'm not opposed to beta products (many of our dependencies are still on 0.X versions), but there has to be a clear reason to switch. Setuptools/pip is more popular and seems to offer all of the same features as poetry, so it's unclear what advantage there is to switching. Anyway, I'll continue to keep my eyes on poetry/flit and see if that add any interesting new features. |
@weiji14 full disclaimer, @adamjstewart is heavily biased towards using |
Spack still calls pip to actually install packages, and pip calls the build backend (setuptools, poetry, flit) to build wheels, so Spack is certainly not mutually exclusive with poetry. But yes, many of the nice CLI features that poetry offers are lost on me because Spack already supports all of them. |
Migrate dependency specification from setup.cfg to pyproject.toml. Using poetry to manage the dependencies.
References:
TODO:
.github/workflows/test.yaml
to usepoetry install
instead ofpip install
setup.cfg
file