What's the idiomatic way to build python projects that depend on projects in other source control repositories (e.g private projects not on pypi)?
Let's say I have a project foobar
hosted at https://example.com/foobar.git
and I want to include it in the setup.py
of another project.
Is there something similar to maven's scm plugin, where I can specify something like Extension('foobar', scm='scm:git:https://example.com/foobar.git')
You can specify additional places to install dependencies from using the dependency_links
option:
setup(
...
dependency_links=[
'git+https://example.com/spamneggs/foobar.git#egg=foobar-1.2.3'
]
install_requires=[
'foobar',
]
)
The dependency_links
entry is used to find packages, and for SCM-stored packages the #egg=package-version
fragment identifier lets tools know what package and what version will be found at that link.
See the "Dependencies that aren’t in PyPI" chapter of the setuptools project documentation.