python package management confusion
On Saturday, 19 January 2019 07:33:50 UTC, dieter wrote:
> dcs3spp via Python-list <python-list at python.org> writes:
> > On Friday, 18 January 2019 07:39:00 UTC, dieter wrote:
> > ...
> > My situation is similar to the following....
> > Assume the following two privately developed projects that I have written, each with their own setup.py:
> > 1. parent exists in folder $HOME/project/
> > 2. child exists in folder $HOME/a_different_project/
> > *child could be also be used by other projects in the future....
> > parent has a dependency requirement on child and so child is listed as an install dependency in parent setup.py
> > if I try python setup.py develop from parent project it fails to find child dependency on build.
> Do you tell me to have a cyclic dependency structure?
> If not, first install "child" in your virtualenv (by whatever
> means, maybe "python setup.py develop"), then "parent".
Thanks for your suggestion.No, no cyclic dependency structure. Child does not depend on parent. Child could be used by separate projects in the future. Child will not be cyclic, it will not import projects that import it.
Installing child first is what I tried yesterday, https://github.com/dcs3spp/setuptools_dependency_example/blob/master/README.md , when trying to understand the suggested approach of using python setup.py develop to pull dependencies.
The advantage of the devpi approach, adopted earlier, is that this additional complexity is hidden from developers. They do not need to be concerned about the order that they install dependencies, e.g. install child first and then install parent. Developers just run python setup.py develop and it automatically fetches the child dependency.
However, the devpi approach requires a private repository to be setup and I am not sure whether it is possible to give access to it for usage in CI cloud technologies, such as gitlab.com. If I stuck with devpi then I would presumably have to follow the route of a bare metal environment for CI server (e.g. Jenkins). Hence, my thoughts on paying subscription to a private pypi cloud repository?..
My question is, can setuptools be configured to pull in child from a separate git repository when running?python setup.py develop?from parent folder? I have since found and tried this approach at https://stackoverflow.com/a/53706140/8325270
It appears that later versions of setuptools can install via a PEP508 url. I currently trying to investigate this approach?..