Search code examples
pythonpipsetuptoolspypi

pip: Any workaround to avoid --allow-external?


Recent versions of pip installer hasn’t installed packages that do not upload their package files to PyPI unless the user explicitly provide --allow-external option (related answer).

I want to distribute my package that depend on such library like dirspec. Currently I have to tell users of my package to install my package by the following command:

$ pip install --allow-external dirspec MyPackage

It becomes more problematic when it comes to library packaging. If my package is a library I also have to tell authors of packages that depend on my package to tell their users to install their package by the following command:

$ pip install --allow-external dirspec TheirPackage

Is there any workaround to avoid this situtation?


Solution

  • The right thing to do is include the requirements in your tarball or in a mega-tarball containing their projects and yours. Then pip will happily install from the local files.