I’m having an issue with python-setuptools.tcz to build ansible.
I ran into this also with the previous available version 41.0.1 and now also with 45.2.0.
I found a workaround by installing setuptools manually.
Error I get:
$ python setup.py build
Ansible now needs setuptools in order to build. Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools).
The part in the ansible code that looks to be involved:
try:
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py as BuildPy
from setuptools.command.install_lib import install_lib as InstallLib
from setuptools.command.install_scripts import install_scripts as InstallScripts
except ImportError:
print("Ansible now needs setuptools in order to build. Install it using"
" your package manager (usually python-setuptools) or via pip (pip"
" install setuptools).", file=sys.stderr)
sys.exit(1)
If I comment out the exit line I see the following:
$ python setup.py build
Ansible now needs setuptools in order to build. Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools).
Traceback (most recent call last):
File "setup.py", line 104, in <module>
class BuildPyCommand(BuildPy):
NameError: name 'BuildPy' is not defined
If I install setuptools using the following steps it works fine with ansilbe:
cd /tmp
mkdir setuptools
cd /tmp/setuptools
wget https://files.pythonhosted.org/packages/68/75/d1d7b7340b9eb6e0388bf95729e63c410b381eb71fe8875cdfd949d8f9ce/setuptools-45.2.0.zip
unzip setuptools-45.2.0.zip
cd /tmp/setuptools/setuptools-45.2.0
python setup.py build
sudo python setup.py install