Can't run setup.py offline due to setup_requires - setup.py calls home
Chris Narkiewicz
hello at ezaquarii.com
Sun Feb 10 18:33:34 EST 2019
Hi,
I'm trying to build a debian package in offline environment (build server).
To build this package, I need to ship all python dependencies as source
packages and build them there. This is no problem for all, except one
package that has build-time dependencies: Automat-0.70.
debian/rules calls this pip to install all requirements from local
package collection:
pip3 install --log=... --no-cache --no-index --find-links=pypi
--no-binary=":all:" -r requirements.txt
Directory pypi contains ALL dependencies required for build.
This works ok when build server has connection to network, but fails for
offline builds. I pinpointed the problem to package Automat, that
specifies some dependencies via setup_requires=[...]:
setup(
...,
setup_requires=[
'setuptools-scm',
'm2r',
],
...
)
Trying to build Automat locally by calling setup.py fails immediately in
my offline environment:
$ python setup.py
...
distutils.errors.DistutilsError: Download error for
https://files.pythonhosted.org/packages/39/e7/9fae11a45f5e1a3a21d8a98d02948e597c4afd7848a0dbe1a1ebd235f13e/m2r-0.2.1.tar.gz#sha256=bf90bad66cda1164b17e5ba4a037806d2443f2a4d5ddc9f6a5554a0322aaed99:
[Errno 111] Connection refused
Is there any way to stop Distutils from calling home?
Best regards,
Chris Narkiewicz
More information about the Python-list
mailing list