You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also encountered the error while while installing python-memcached:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-awdnpsmf/python-memcached/setup.py", line 8, in <module>
version=get_module_constant('memcache', '__version__'),
File "/usr/local/lib/python3.6/site-packages/setuptools/depends.py", line 164, in get_module_constant
return extract_constant(code, symbol, default)
File "/usr/local/lib/python3.6/site-packages/setuptools/depends.py", line 197, in extract_constant
const = code.co_consts[arg]
IndexError: tuple index out of range
@yosifkit Would you accept a PR adding pip install -U setuptools
to the Dockerfile ?
Given that the current version of setuptools is 28.8.8, released in November 2016, and the newest is 34.3.3, released a day ago, we definitely need a better way to keep it up to date. I had thought that the 3.6.1 bump would've included a newer setuptools 😢
Just adding the pip install -U setuptools would not be enough to trigger a rebuild when a new version of setuptools comes out, so we'll have to make sure that a version is specified like pip. Which means that we'll also need to change update.sh to grab the setuptools version and bump all the files.
# line 62 https://github.com/docker-library/python/blob/32e920eb13714a9aeff2e016fb467901222d17b5/3.6/Dockerfile#L62- && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \+ && pip3 install --no-cache-dir --upgrade --force-reinstall \+ "pip==$PYTHON_PIP_VERSION" \+ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \# of course there would need to be another ENV up by line 26 for this new version
Would this be harmful to apply to all the versions of python (2.7, 3.3, 3.4, 3.5, and 3.6) or would they break? We currently have Dockerfile templates and having it only apply to 3.6 would complicate things.
Activity
yosifkit commentedon Jan 11, 2017
Looks like python should offer a new release with a working
setuptools. 😉😉But I guess we'll have to work around it and fix it similar to how we keep pip up to date. 🤢
Edit: especially doing it in the same
RUNline to keep the size smaller.jouve commentedon Mar 27, 2017
Hi,
I also encountered the error while while installing python-memcached:
@yosifkit Would you accept a PR adding
pip install -U setuptoolsto the Dockerfile ?
yosifkit commentedon Mar 27, 2017
Given that the current version of setuptools is 28.8.8, released in November 2016, and the newest is 34.3.3, released a day ago, we definitely need a better way to keep it up to date. I had thought that the 3.6.1 bump would've included a newer setuptools 😢
Just adding the
pip install -U setuptoolswould not be enough to trigger a rebuild when a new version of setuptools comes out, so we'll have to make sure that a version is specified like pip. Which means that we'll also need to changeupdate.shto grab the setuptools version and bump all the files.Would this be harmful to apply to all the versions of python (2.7, 3.3, 3.4, 3.5, and 3.6) or would they break? We currently have Dockerfile templates and having it only apply to 3.6 would complicate things.
tianon commentedon Apr 4, 2017
See also #186 (comment) where we're discussing something similar (
wheelthere, butsetuptoolsas well sinceget-pip.pyinstalls all three).yosifkit commentedon May 1, 2018
Fixed by #186, #194.