Hi all, I have my third-party dependencies for a P...
# general
f
Hi all, I have my third-party dependencies for a Python package specified in a
pyproject.toml
file, using Flit to build the sdist/wheel. Is there a way to set a
python_requirements
to read the
pyproject.toml
file, when I’m not using Poetry? I saw that Pants supports PEP 517 to build the distribution, but I’m curious if it can also single-source the external dependencies. Thanks!
h
Are the deps in pyproject.toml poetry-compatible? Or does flit do its own thing? If the former then a (possibly misnamed...)
poetry_requirements()
target should do the trick I think
If not, it shouldn't be onerous to write a
flit_dependencies
target
f
It’s in a separate section
Copy code
[project]
...
dependencies = [
    ...
]
...
whereas Poetry is
Copy code
[tool.poetry.dependencies]
flask = ...
I’ll look at making a new target, thank you!
h
It might make sense to upstream
flit_dependencies
!
f
Thanks! I’ll get something working and try to upstream it 😄
❤️ 1
h
please feel free to ask for help! we definitely are eager to help out contributors 🙂 Check out https://www.pantsbuild.org/docs/contributor-overview for contribution guide, and https://www.pantsbuild.org/docs/plugins-overview for plugins in general I'm happy to write out more detailed instructions on how to do this if it would help
e
👍 1
f
Ah awesome!