Skip to content Skip to sidebar Skip to footer

Python Setuptools: How Do I Specify Dependencies In A Private Pypi Repo, Hosted On Nexus?

I'm unable to build a python wheel which has a dependency on a package in a private PyPI repository (hosted on Sonatype Nexus Repository Manager, vOSS 3.17.0-01). I can search for

Solution 1:

You should only use pip (or any other installer) to install Python projects. Installing by calling python setup.py install for example is an outdated practice (that often does not work). So in consequence, you probably should remove the dependency_links parameter of your setup.py, and instruct your users to install with the correct pip flags exactly as you have shown at the end of your question:

python -m pip install --trusted-host nexus.example.local \
   >  --index-url http://nexus.example.local/nexus/repository/pypi-playground-public/simple \
   >  data-feed-ping

In the same way python setup.py test: is outdated/deprecated as well, and you might be well-advised to move on to a more modern test runner (pytest is the one that comes to mind, but there are probably others, maybe nose).

Post a Comment for "Python Setuptools: How Do I Specify Dependencies In A Private Pypi Repo, Hosted On Nexus?"