This is likely an issue with my understanding of how python modules are packaged but I am confused as to how pip determines what a modules dependencies are when it installs a module. It appears that different build tools have their own way of specifying dependencies for example in poetry it is:
[tool.poetry.dependencies]
requests = "^2.13.0"
Where as under setuptools it is:
[project]
dependencies = [
"docutils",
"BazSpam == 1.1",
]
So yer I'm confused as to how pip can determine what are a module's dependencies if each build system has its own unique specification within the pyproject.toml file. I'm guess theres some standard format in the built tar.gz file but if thats the case then how does pip know what to install if its installing from source like from a GitHub repo ?
In fact, the
setup.pyis the configure forpipto determine the dependency.setup.pyin it.setup.pyin that github repo.pyproject.toml, the poetry will automatically generate asetup.pyto the tar.gz after you inputpoetry build.So, for any high level build tool, if we use
pipto install the built out, thepipwill all useinstall_requiressettings insetup.py, no matter thesetup.pygenerated explicitly or implicitly.Update:
It looks the new pip version already could recognize the
pyproject.toml, so in fact thesetup.pyauto generated is for low version pip compatibility use I think.