https://pantsbuild.org/ logo
#general
Title
# general
f

future-oxygen-10553

08/04/2022, 5:27 PM
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

happy-kitchen-89482

08/04/2022, 5:42 PM
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

future-oxygen-10553

08/04/2022, 5:43 PM
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

hundreds-father-404

08/04/2022, 5:47 PM
It might make sense to upstream
flit_dependencies
!
f

future-oxygen-10553

08/04/2022, 5:58 PM
Thanks! I’ll get something working and try to upstream it 😄
❤️ 1
h

hundreds-father-404

08/04/2022, 6:35 PM
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

enough-analyst-54434

08/04/2022, 7:55 PM
👍 1
f

future-oxygen-10553

08/04/2022, 8:12 PM
Ah awesome!
7 Views