SpriteLink / NIPAP

Neat IP Address Planner - NIPAP is the best open source IPAM in the known universe, challenging classical IP address management (IPAM) systems in many areas.
https://spritelink.github.io/NIPAP/
MIT License
539 stars 131 forks source link

Dockerfile.nipapd Fails to build #1304

Open sethbeauchamp opened 2 years ago

sethbeauchamp commented 2 years ago

Trying to build this dockerfile fails. Below is the bottom of the build output where the error occurs.

#6 121.6 Collecting envtpl
#6 121.9   Downloading https://files.pythonhosted.org/packages/02/d6/c00aac9a35972a6c0fcf55afdf2f61c9316a6b688db01185c948d9d78b26/envtpl-0.6.0.tar.gz
#6 122.1 Requirement already satisfied (use --upgrade to upgrade): argparse>=1.0 in /usr/lib/python2.7 (from envtpl)
#6 122.1 Collecting Jinja2>=2.7 (from envtpl)
#6 122.2   Downloading https://files.pythonhosted.org/packages/89/e3/b36266381ae7a1310a653bb85f4f3658c462a69634fa9b2fef76252a50ed/Jinja2-3.1.1.tar.gz (267kB)
#6 122.4   Requested Jinja2>=2.7 from https://files.pythonhosted.org/packages/89/e3/b36266381ae7a1310a653bb85f4f3658c462a69634fa9b2fef76252a50ed/Jinja2-3.1.1.tar.gz#sha256=640bed4bb501cbd17194b3cace1dc2126f5b619cf068a726b98192a0fde74ae9 (from envtpl), but installing version None
#6 122.4 Collecting MarkupSafe>=2.0 (from Jinja2>=2.7->envtpl)
#6 122.6   Downloading https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz
#6 122.7     Complete output from command python setup.py egg_info:
#6 122.7     Traceback (most recent call last):
#6 122.7       File "<string>", line 1, in <module>
#6 122.7       File "/tmp/pip-build-BWyhJE/MarkupSafe/setup.py", line 26
#6 122.7         raise BuildFailed() from e
#6 122.7                                ^
#6 122.7     SyntaxError: invalid syntax
#6 122.7     
#6 122.7     ----------------------------------------
#6 122.7 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BWyhJE/MarkupSafe/
#6 123.0 You are using pip version 8.1.1, however version 22.0.4 is available.
#6 123.0 You should consider upgrading via the 'pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c apt-get update -qy && apt-get upgrade -qy  && apt-get install -qy devscripts     make     libpq-dev     libsqlite3-dev     postgresql-client     python     python-all     python-docutils     python-pip     python-dev  && pip --no-input install envtpl  && rm -rf /var/lib/apt/lists/*]: exit code: 1
sethbeauchamp commented 2 years ago

Dockerfile.www also has a similar error

jonkerj commented 1 year ago

I'm running into this as well. raise .. from is a new feature since Python 3, and most (all?) of NIPAP is written in Python 2. I think it is caused by the pip --no-input install envtpl, which pulls the latest envtpl, which is based on Python 3.

It could be fixed by pinning the causing dependency to a suitable Python 2 predecessor, or (IMHO the better option but far longer option) wait for #1316

jonkerj commented 1 year ago

With my PR, I am able to build both containers