From 1b2de86122e9606afcf96d5fc42b7887f35ad9f6 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Wed, 11 Dec 2019 07:12:54 +0100 Subject: [PATCH 1/5] Deprecate legacy buildpack --- repo2docker/buildpacks/legacy/__init__.py | 128 +---- repo2docker/buildpacks/legacy/freeze.py | 8 +- .../buildpacks/legacy/python3.frozen.yml | 444 ++++++++++-------- repo2docker/buildpacks/legacy/python3.yml | 2 +- repo2docker/buildpacks/legacy/root.frozen.yml | 44 +- repo2docker/buildpacks/legacy/root.yml | 2 +- 6 files changed, 298 insertions(+), 330 deletions(-) diff --git a/repo2docker/buildpacks/legacy/__init__.py b/repo2docker/buildpacks/legacy/__init__.py index 8d078b1e..4a8fd9af 100644 --- a/repo2docker/buildpacks/legacy/__init__.py +++ b/repo2docker/buildpacks/legacy/__init__.py @@ -5,130 +5,34 @@ The Dockerfile is amended to add the contents of the repository to the image and install a supported version of the notebook and IPython kernel. +Note: This buildpack has been deprecated. """ -import os -import shutil -from textwrap import dedent -from ..docker import DockerBuildPack +import logging -class LegacyBinderDockerBuildPack(DockerBuildPack): - """Legacy build pack for compatibility to first version of Binder.""" +class LegacyBinderDockerBuildPack: + """Legacy build pack for compatibility to first version of Binder. - dockerfile = "._binder.Dockerfile" - - legacy_prependix = dedent( - r""" - USER root - # update the source list now that jessie is archived - COPY apt-sources.list /etc/apt/sources.list - USER main - COPY python3.frozen.yml /tmp/python3.frozen.yml - COPY root.frozen.yml /tmp/root.frozen.yml - - # update conda in two steps because the base image - # has very old conda that can't upgrade past 4.3 - RUN conda install -yq conda>=4.3 && \ - conda install -yq conda==4.4.11 && \ - conda env update -n python3 -f /tmp/python3.frozen.yml && \ - conda remove -yq -n python3 nb_conda_kernels _nb_ext_conf && \ - conda env update -n root -f /tmp/root.frozen.yml && \ - /home/main/anaconda2/envs/python3/bin/ipython kernel install --sys-prefix && \ - /home/main/anaconda2/bin/ipython kernel install --prefix=/home/main/anaconda2/envs/python3 && \ - /home/main/anaconda2/bin/ipython kernel install --sys-prefix + This buildpack has been deprecated. """ - ) - - legacy_appendix = dedent( - r""" - USER root - COPY . /home/main/notebooks - RUN chown -R main:main /home/main/notebooks && \ - rm /home/main/notebooks/root.frozen.yml && \ - rm /home/main/notebooks/python3.frozen.yml && \ - rm /home/main/notebooks/apt-sources.list - USER main - WORKDIR /home/main/notebooks - ENV PATH /home/main/anaconda2/envs/python3/bin:$PATH - ENV JUPYTER_PATH /home/main/anaconda2/share/jupyter:$JUPYTER_PATH - CMD jupyter notebook --ip 0.0.0.0 - """ - ) - - def render(self): - """Render buildpack into a Dockerfile. - - Render legacy image source (andrewosh/binder-base at a specific commit) - and then prependix. Render appendix (post-build commands) at the end of - the Dockerfile. - - """ - segments = [ - "FROM andrewosh/binder-base@sha256:eabde24f4c55174832ed8795faa40cea62fc9e2a4a9f1ee1444f8a2e4f9710ee", - self.legacy_prependix, - ] - with open("Dockerfile") as f: - for line in f: - if line.strip().startswith("FROM"): - break - segments.append(f.read()) - segments.append(self.legacy_appendix) - return "\n".join(segments) - - def get_build_script_files(self): - """ - Dict of files to be copied to the container image for use in building. - - This is copied before the `build_scripts` & `assemble_scripts` are - run, so can be executed from either of them. - - It's a dictionary where the key is the source file path in the host - system, and the value is the destination file path inside the - container image. - - This currently adds a frozen set of Python requirements to the dict - of files. - - """ - return { - "legacy/root.frozen.yml": "/tmp/root.frozen.yml", - "legacy/python3.frozen.yml": "/tmp/python3.frozen.yml", - "legacy/apt-sources.list": "/tmp/apt-sources.list", - } - - def build( - self, - client, - image_spec, - memory_limit, - build_args, - cache_from, - extra_build_kwargs, - ): - """Build a legacy Docker image.""" - with open(self.dockerfile, "w") as f: - f.write(self.render()) - for env in ("root", "python3"): - env_file = env + ".frozen.yml" - src_path = os.path.join(os.path.dirname(__file__), env_file) - shutil.copy(src_path, env_file) - - src_path = os.path.join(os.path.dirname(__file__), "apt-sources.list") - shutil.copy(src_path, "apt-sources.list") - - return super().build( - client, image_spec, memory_limit, build_args, cache_from, extra_build_kwargs - ) def detect(self): - """Check if current repo should be built with the Legacy BuildPack. - """ + """Check if current repo should be built with the Legacy BuildPack.""" + log = logging.getLogger("repo2docker") try: with open("Dockerfile", "r") as f: for line in f: if line.startswith("FROM"): if "andrewosh/binder-base" in line.split("#")[0].lower(): - return True + log.error( + "The legacy buildpack was deprecated in January 2020." + ) + log.error( + "Please see https://repo2docker.readthedocs.io/en/" + "latest/configuration/index.html for alternative ways " + "of configuring your repository." + ) + raise RuntimeError("The legacy buildpack has been removed.") else: return False except FileNotFoundError: diff --git a/repo2docker/buildpacks/legacy/freeze.py b/repo2docker/buildpacks/legacy/freeze.py index f57a17ec..5b2f80fe 100755 --- a/repo2docker/buildpacks/legacy/freeze.py +++ b/repo2docker/buildpacks/legacy/freeze.py @@ -17,7 +17,7 @@ from subprocess import check_call import sys # need conda ≥ 4.4 to avoid bug adding spurious pip dependencies -CONDA_VERSION = "4.4.11" +CONDA_VERSION = "4.7.10" HERE = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) @@ -45,13 +45,13 @@ def freeze(env_name, env_file, frozen_file): "--rm", "-v" f"{HERE}:/r2d", "-it", - f"andrewosh/binder-base", + f"andrewosh/binder-base@sha256:eabde24f4c55174832ed8795faa40cea62fc9e2a4a9f1ee1444f8a2e4f9710ee", "sh", "-c", "; ".join( [ - "conda update -yq conda", - f"conda install -yq conda={CONDA_VERSION}", + "conda update -yq conda>=4.3", + f"conda install -y conda={CONDA_VERSION}", "conda config --system --set auto_update_conda false", f"conda env update -f /r2d/{env_file} -n {env_name}", # exclude conda packages because we don't want to pin them diff --git a/repo2docker/buildpacks/legacy/python3.frozen.yml b/repo2docker/buildpacks/legacy/python3.frozen.yml index b444241b..5698727a 100644 --- a/repo2docker/buildpacks/legacy/python3.frozen.yml +++ b/repo2docker/buildpacks/legacy/python3.frozen.yml @@ -1,197 +1,259 @@ # AUTO GENERATED FROM python3.yml, DO NOT MANUALLY MODIFY -# Frozen on 2018-03-20 11:41:06 UTC +# Frozen on 2019-12-11 21:33:39 UTC name: python3 channels: - defaults dependencies: - - _license=1.1=py35_1 - - _nb_ext_conf=0.3.0=py35_0 - - alabaster=0.7.9=py35_0 - - argcomplete=1.0.0=py35_1 - - astroid=1.4.7=py35_0 - - astropy=1.2.1=np111py35_0 - - babel=2.3.4=py35_0 - - backports=1.0=py35_0 - - beautifulsoup4=4.5.1=py35_0 - - bitarray=0.8.1=py35_0 - - blaze=0.10.1=py35_0 - - bokeh=0.12.2=py35_0 - - boto=2.42.0=py35_0 - - bottleneck=1.1.0=np111py35_0 - - cairo=1.12.18=6 - - cffi=1.7.0=py35_0 - - chest=0.2.3=py35_0 - - click=6.6=py35_0 - - cloudpickle=0.2.1=py35_0 - - clyent=1.2.2=py35_0 - - colorama=0.3.7=py35_0 - - configobj=5.0.6=py35_0 - - contextlib2=0.5.3=py35_0 - - cryptography=1.5=py35_0 - - curl=7.49.0=1 - - cycler=0.10.0=py35_0 - - cython=0.24.1=py35_0 - - cytoolz=0.8.0=py35_0 - - dask=0.11.0=py35_0 - - datashape=0.5.2=py35_0 - - dbus=1.10.10=0 - - decorator=4.0.10=py35_0 - - dill=0.2.5=py35_0 - - docutils=0.12=py35_2 - - dynd-python=0.7.2=py35_0 - - entrypoints=0.2.2=py35_0 - - et_xmlfile=1.0.1=py35_0 - - expat=2.1.0=0 - - fastcache=1.0.2=py35_1 - - filelock=2.0.6=py35_0 - - flask=0.11.1=py35_0 - - flask-cors=2.1.2=py35_0 - - fontconfig=2.11.1=6 - - freetype=2.5.5=1 - - get_terminal_size=1.0.0=py35_0 - - gevent=1.1.2=py35_0 - - glib=2.43.0=1 - - greenlet=0.4.10=py35_0 - - gst-plugins-base=1.8.0=0 - - gstreamer=1.8.0=0 - - h5py=2.6.0=np111py35_2 - - harfbuzz=0.9.39=1 - - hdf5=1.8.17=1 - - heapdict=1.0.0=py35_1 - - icu=54.1=0 - - idna=2.1=py35_0 - - imagesize=0.7.1=py35_0 - - ipykernel=4.5.0=py35_0 - - ipython=5.1.0=py35_0 - - ipython_genutils=0.1.0=py35_0 - - ipywidgets=5.2.2=py35_0 - - itsdangerous=0.24=py35_0 - - jbig=2.1=0 - - jdcal=1.2=py35_1 - - jedi=0.9.0=py35_1 - - jinja2=2.8=py35_1 - - jpeg=8d=2 - - jsonschema=2.5.1=py35_0 - - jupyter=1.0.0=py35_3 - - jupyter_client=4.4.0=py35_0 - - jupyter_console=5.0.0=py35_0 - - jupyter_core=4.2.0=py35_0 - - lazy-object-proxy=1.2.1=py35_0 - - libdynd=0.7.2=0 - - libffi=3.2.1=0 - - libgcc=4.8.5=2 - - libgfortran=3.0.0=1 - - libpng=1.6.22=0 - - libsodium=1.0.10=0 - - libtiff=4.0.6=2 - - libxcb=1.12=0 - - libxml2=2.9.2=0 - - libxslt=1.1.28=0 - - llvmlite=0.13.0=py35_0 - - locket=0.2.0=py35_1 - - lxml=3.6.4=py35_0 - - markupsafe=0.23=py35_2 - - matplotlib=1.5.3=np111py35_0 - - mistune=0.7.3=py35_0 - - mkl=11.3.3=0 - - mkl-service=1.1.2=py35_2 - - mpmath=0.19=py35_1 - - multipledispatch=0.4.8=py35_0 - - nbconvert=4.2.0=py35_0 - - nbformat=4.1.0=py35_0 - - nbpresent=3.0.2=py35_0 - - networkx=1.11=py35_0 - - nltk=3.2.1=py35_0 - - nose=1.3.7=py35_1 - - notebook=4.2.3=py35_0 - - numba=0.28.1=np111py35_0 - - numexpr=2.6.1=np111py35_0 - - numpy=1.11.1=py35_0 - - odo=0.5.0=py35_1 - - openpyxl=2.3.2=py35_0 - - openssl=1.0.2j=0 - - pandas=0.18.1=np111py35_0 - - partd=0.3.6=py35_0 - - patchelf=0.9=0 - - path.py=8.2.1=py35_0 - - pathlib2=2.1.0=py35_0 - - patsy=0.4.1=py35_0 - - pep8=1.7.0=py35_0 - - pexpect=4.0.1=py35_0 - - pickleshare=0.7.4=py35_0 - - pillow=3.3.1=py35_0 - - pip=8.1.2=py35_0 - - pixman=0.32.6=0 - - pkginfo=1.3.2=py35_0 - - ply=3.9=py35_0 - - prompt_toolkit=1.0.3=py35_0 - - psutil=4.3.1=py35_0 - - ptyprocess=0.5.1=py35_0 - - py=1.4.31=py35_0 - - pyasn1=0.1.9=py35_0 - - pycosat=0.6.1=py35_1 - - pycparser=2.14=py35_1 - - pycrypto=2.6.1=py35_4 - - pycurl=7.43.0=py35_0 - - pyflakes=1.3.0=py35_0 - - pygments=2.1.3=py35_0 - - pylint=1.5.4=py35_1 - - pyopenssl=16.0.0=py35_0 - - pyparsing=2.1.4=py35_0 - - pyqt=5.6.0=py35_0 - - pytables=3.2.3.1=np111py35_0 - - pytest=2.9.2=py35_0 - - python=3.5.2=0 - - python-dateutil=2.5.3=py35_0 - - pytz=2016.6.1=py35_0 - - pyyaml=3.12=py35_0 - - pyzmq=15.4.0=py35_0 - - qt=5.6.0=0 - - qtawesome=0.3.3=py35_0 - - qtconsole=4.2.1=py35_1 - - qtpy=1.1.2=py35_0 - - readline=6.2=2 - - redis=3.2.0=0 - - redis-py=2.10.5=py35_0 - - requests=2.11.1=py35_0 - - rope=0.9.4=py35_1 - - scikit-image=0.12.3=np111py35_1 - - scikit-learn=0.17.1=np111py35_2 - - scipy=0.18.1=np111py35_0 - - setuptools=27.2.0=py35_0 - - simplegeneric=0.8.1=py35_1 - - singledispatch=3.4.0.3=py35_0 - - sip=4.18=py35_0 - - six=1.10.0=py35_0 - - snowballstemmer=1.2.1=py35_0 - - sockjs-tornado=1.0.3=py35_0 - - sphinx=1.4.6=py35_0 - - spyder=3.0.0=py35_0 - - sqlalchemy=1.0.13=py35_0 - - sqlite=3.13.0=0 - - statsmodels=0.6.1=np111py35_1 - - sympy=1.0=py35_0 - - terminado=0.6=py35_0 - - tk=8.5.18=0 - - toolz=0.8.0=py35_0 - - tornado=4.4.1=py35_0 - - traitlets=4.3.0=py35_0 - - unicodecsv=0.14.1=py35_0 - - wcwidth=0.1.7=py35_0 - - werkzeug=0.11.11=py35_0 - - wheel=0.29.0=py35_0 - - widgetsnbextension=1.2.6=py35_0 - - wrapt=1.10.6=py35_0 - - xlrd=1.0.0=py35_0 - - xlsxwriter=0.9.3=py35_0 - - xlwt=1.1.2=py35_0 - - xz=5.2.2=0 - - yaml=0.1.6=0 - - zeromq=4.1.4=0 - - zlib=1.2.8=3 - - pip: - - backports.shutil-get-terminal-size==1.0.0 - - dynd==0.7.3.dev1 - - rope-py3k==0.9.4.post1 - - tables==3.2.3.1 + - _libgcc_mutex=0.1=main + - alabaster=0.7.12=py_0 + - asn1crypto=0.24.0=py35_0 + - astroid=1.6.5=py35_0 + - astropy=2.0.8=py35h035aef0_0 + - atomicwrites=1.3.0=py_0 + - attrs=19.3.0=py_0 + - babel=2.7.0=py_0 + - backcall=0.1.0=py35_0 + - backports=1.0=py_2 + - backports.shutil_get_terminal_size=1.0.0=py35_2 + - beautifulsoup4=4.6.3=py35_0 + - bitarray=0.8.3=py35h14c3975_0 + - bkcharts=0.2=py35he4f7e30_0 + - blas=1.0=mkl + - blaze=0.11.3=py35_0 + - bleach=3.1.0=py_0 + - blosc=1.16.3=hd408876_0 + - bokeh=0.13.0=py35_0 + - boto=2.49.0=py35_0 + - bottleneck=1.2.1=py35h035aef0_1 + - bzip2=1.0.8=h7b6447c_0 + - ca-certificates=2019.11.27=0 + - cairo=1.14.12=h8948797_3 + - certifi=2018.8.24=py35_1 + - cffi=1.11.5=py35he75722e_1 + - chardet=3.0.4=py35_1 + - click=7.0=py_0 + - cloudpickle=1.2.2=py_0 + - clyent=1.2.2=py35_1 + - colorama=0.4.1=py_0 + - contextlib2=0.6.0.post1=py_0 + - cryptography=2.3.1=py35hc365091_0 + - curl=7.61.0=h84994c4_0 + - cycler=0.10.0=py35hc4d5149_0 + - cython=0.28.5=py35hf484d3e_0 + - cytoolz=0.9.0.1=py35h14c3975_1 + - dask=0.19.2=py35_0 + - dask-core=0.19.2=py35_0 + - datashape=0.5.4=py35_1 + - dbus=1.13.12=h746ee38_0 + - decorator=4.4.1=py_0 + - defusedxml=0.6.0=py_0 + - distributed=1.23.2=py35_0 + - docutils=0.14=py35hd11081d_0 + - entrypoints=0.2.3=py35_2 + - et_xmlfile=1.0.1=py35hde8d43e_0 + - expat=2.2.6=he6710b0_0 + - fastcache=1.0.2=py35h14c3975_2 + - filelock=3.0.12=py_0 + - flask=1.1.1=py_0 + - flask-cors=3.0.8=py_0 + - fontconfig=2.13.0=h9420a91_0 + - freetype=2.9.1=h8a8886c_1 + - fribidi=1.0.5=h7b6447c_0 + - get_terminal_size=1.0.0=haa9412d_0 + - gevent=1.3.6=py35h7b6447c_0 + - glib=2.63.1=h5a9c865_0 + - glob2=0.7=py_0 + - gmp=6.1.2=h6c8ec71_1 + - gmpy2=2.0.8=py35hd0a1c9a_2 + - graphite2=1.3.13=h23475e2_0 + - greenlet=0.4.15=py35h7b6447c_0 + - gst-plugins-base=1.14.0=hbbd80ab_1 + - gstreamer=1.14.0=hb453b48_1 + - h5py=2.8.0=py35h989c5e5_3 + - harfbuzz=1.8.8=hffaf4a1_0 + - hdf5=1.10.2=hba1933b_1 + - heapdict=1.0.1=py_0 + - html5lib=1.0.1=py35_0 + - icu=58.2=h9c2bf20_1 + - idna=2.7=py35_0 + - imageio=2.4.1=py35_0 + - imagesize=1.1.0=py35_0 + - intel-openmp=2019.4=243 + - ipykernel=4.8.2=py35_0 + - ipython=6.5.0=py35_0 + - ipython_genutils=0.2.0=py35hc9e07d0_0 + - ipywidgets=7.4.1=py35_0 + - isort=4.3.4=py35_0 + - itsdangerous=1.1.0=py_0 + - jbig=2.1=hdba287a_0 + - jdcal=1.4.1=py_0 + - jedi=0.12.1=py35_0 + - jinja2=2.10.3=py_0 + - jpeg=9b=h024ee3a_2 + - json5=0.8.5=py_0 + - jsonschema=2.6.0=py35h4395190_0 + - jupyter=1.0.0=py35_7 + - jupyter_client=5.3.3=py_0 + - jupyter_console=5.2.0=py35h4044a63_1 + - jupyter_core=4.5.0=py_0 + - jupyterlab=1.2.3=pyhf63ae98_0 + - jupyterlab_launcher=0.13.1=py35_0 + - jupyterlab_server=1.0.0=py_0 + - kiwisolver=1.0.1=py35hf484d3e_0 + - lazy-object-proxy=1.3.1=py35h14c3975_2 + - libcurl=7.61.0=h1ad7b7a_0 + - libedit=3.1.20181209=hc058e9b_0 + - libffi=3.2.1=hd88cf55_4 + - libgcc-ng=9.1.0=hdf63c60_0 + - libgfortran-ng=7.3.0=hdf63c60_0 + - libpng=1.6.37=hbc83047_0 + - libsodium=1.0.16=h1bed415_0 + - libssh2=1.8.0=h9cfc8f7_4 + - libstdcxx-ng=9.1.0=hdf63c60_0 + - libtiff=4.1.0=h2733197_0 + - libtool=2.4.6=h7b6447c_5 + - libuuid=1.0.3=h1bed415_2 + - libxcb=1.13=h1bed415_1 + - libxml2=2.9.9=hea5a465_1 + - libxslt=1.1.33=h7d1a2b0_0 + - llvmlite=0.24.0=py35hdbcaa40_0 + - locket=0.2.0=py35h170bc82_1 + - lxml=4.2.5=py35hefd8a0e_0 + - lz4-c=1.8.1.2=h14c3975_0 + - lzo=2.10=h49e0be7_2 + - markupsafe=1.0=py35h14c3975_1 + - matplotlib=3.0.0=py35h5429711_0 + - mccabe=0.6.1=py35_1 + - mistune=0.8.3=py35h14c3975_1 + - mkl=2018.0.3=1 + - mkl-service=1.1.2=py35h90e4bf4_5 + - more-itertools=4.3.0=py35_0 + - mpc=1.0.3=hec55b23_5 + - mpfr=3.1.5=h11a74b3_2 + - mpmath=1.0.0=py35_2 + - msgpack-python=0.5.6=py35h6bb024c_1 + - multipledispatch=0.6.0=py35_0 + - nbconvert=5.5.0=py_0 + - nbformat=4.4.0=py35h12e6e07_0 + - ncurses=6.1=he6710b0_1 + - networkx=2.4=py_0 + - nltk=3.3.0=py35_0 + - nose=1.3.7=py35_2 + - notebook=5.4.1=py35_0 + - numba=0.39.0=py35h04863e7_0 + - numexpr=2.6.8=py35hd89afb7_0 + - numpy=1.14.2=py35hdbf6ddf_0 + - numpydoc=0.9.1=py_0 + - odo=0.5.1=py35h102315f_0 + - olefile=0.46=py35_0 + - openpyxl=2.6.3=py_0 + - openssl=1.0.2t=h7b6447c_1 + - packaging=19.2=py_0 + - pandas=0.23.4=py35h04863e7_0 + - pandoc=2.2.3.2=0 + - pandocfilters=1.4.2=py35_1 + - pango=1.42.4=h049681c_0 + - parso=0.5.1=py_0 + - partd=1.1.0=py_0 + - patchelf=0.10=he6710b0_0 + - path.py=11.1.0=py35_0 + - pathlib2=2.3.2=py35_0 + - patsy=0.5.0=py35_0 + - pcre=8.43=he6710b0_0 + - pep8=1.7.1=py35_0 + - pexpect=4.6.0=py35_0 + - pickleshare=0.7.4=py35hd57304d_0 + - pillow=5.2.0=py35heded4f4_0 + - pip=10.0.1=py35_0 + - pixman=0.38.0=h7b6447c_0 + - pkginfo=1.4.2=py35_1 + - pluggy=0.11.0=py_0 + - ply=3.11=py35_0 + - prompt_toolkit=1.0.15=py35hc09de7a_0 + - psutil=5.4.7=py35h14c3975_0 + - ptyprocess=0.6.0=py35_0 + - py=1.8.0=py_0 + - pycodestyle=2.4.0=py35_0 + - pycosat=0.6.3=py35h14c3975_0 + - pycparser=2.19=py35_0 + - pycrypto=2.6.1=py35h14c3975_8 + - pycurl=7.43.0.2=py35hb7f436b_0 + - pyflakes=2.0.0=py35_0 + - pygments=2.5.2=py_0 + - pylint=1.9.2=py35_0 + - pyodbc=4.0.24=py35he6710b0_0 + - pyopenssl=18.0.0=py35_0 + - pyparsing=2.4.5=py_0 + - pyqt=5.9.2=py35h05f1152_2 + - pysocks=1.6.8=py35_0 + - pytables=3.4.4=py35ha205bf6_0 + - pytest=3.8.1=py35_0 + - python=3.5.6=hc3d631a_0 + - python-dateutil=2.8.1=py_0 + - pytz=2019.3=py_0 + - pywavelets=1.0.0=py35hdd07704_0 + - pyyaml=3.13=py35h14c3975_0 + - pyzmq=17.1.2=py35h14c3975_0 + - qt=5.9.6=h8703b6f_2 + - qtawesome=0.6.0=py_0 + - qtconsole=4.6.0=py_0 + - qtpy=1.9.0=py_0 + - readline=7.0=h7b6447c_5 + - requests=2.19.1=py35_0 + - rope=0.14.0=py_0 + - ruamel_yaml=0.15.46=py35h14c3975_0 + - scikit-image=0.14.0=py35hf484d3e_1 + - scikit-learn=0.20.0=py35h4989274_1 + - scipy=1.1.0=py35hd20e5f9_0 + - seaborn=0.9.0=pyh91ea838_1 + - send2trash=1.5.0=py35_0 + - setuptools=40.2.0=py35_0 + - simplegeneric=0.8.1=py35_2 + - singledispatch=3.4.0.3=py35h0cd4ec3_0 + - sip=4.19.8=py35hf484d3e_0 + - six=1.11.0=py35_1 + - snappy=1.1.7=hbae5bb6_3 + - snowballstemmer=2.0.0=py_0 + - sortedcollections=1.1.1=py_0 + - sortedcontainers=2.0.5=py35_0 + - sphinx=2.2.2=py_0 + - sphinxcontrib=1.0=py35_1 + - sphinxcontrib-applehelp=1.0.1=py_0 + - sphinxcontrib-devhelp=1.0.1=py_0 + - sphinxcontrib-htmlhelp=1.0.2=py_0 + - sphinxcontrib-jsmath=1.0.1=py_0 + - sphinxcontrib-qthelp=1.0.2=py_0 + - sphinxcontrib-serializinghtml=1.1.3=py_0 + - sphinxcontrib-websupport=1.1.2=py_0 + - spyder=3.2.8=py35_0 + - sqlalchemy=1.2.11=py35h7b6447c_0 + - sqlite=3.30.1=h7b6447c_0 + - statsmodels=0.9.0=py35h3010b51_0 + - sympy=1.2=py35_0 + - tblib=1.5.0=py_0 + - terminado=0.8.1=py35_1 + - testpath=0.4.4=py_0 + - tk=8.6.8=hbc83047_0 + - toolz=0.10.0=py_0 + - tornado=4.5.3=py35_0 + - traitlets=4.3.2=py35ha522a97_0 + - typing=3.6.6=py35_0 + - unicodecsv=0.14.1=py35h4805c0c_0 + - unixodbc=2.3.7=h14c3975_0 + - urllib3=1.23=py35_0 + - wcwidth=0.1.7=py35hcd08066_0 + - webencodings=0.5.1=py35_1 + - werkzeug=0.16.0=py_0 + - wheel=0.31.1=py35_0 + - widgetsnbextension=3.4.1=py35_0 + - wrapt=1.10.11=py35h14c3975_2 + - xlrd=1.2.0=py_0 + - xlsxwriter=1.2.6=py_0 + - xlwt=1.3.0=py35h884a0cf_0 + - xz=5.2.4=h14c3975_4 + - yaml=0.1.7=had09818_2 + - zeromq=4.2.5=hf484d3e_1 + - zict=1.0.0=py_0 + - zlib=1.2.11=h7b6447c_3 + - zstd=1.3.7=h0b5b093_0 diff --git a/repo2docker/buildpacks/legacy/python3.yml b/repo2docker/buildpacks/legacy/python3.yml index 94dc4e14..46ece2d8 100644 --- a/repo2docker/buildpacks/legacy/python3.yml +++ b/repo2docker/buildpacks/legacy/python3.yml @@ -1,4 +1,4 @@ dependencies: - notebook==5.4.1 - ipykernel==4.8.2 - - tornado<5 \ No newline at end of file + - tornado<5 diff --git a/repo2docker/buildpacks/legacy/root.frozen.yml b/repo2docker/buildpacks/legacy/root.frozen.yml index b398f257..f338522f 100644 --- a/repo2docker/buildpacks/legacy/root.frozen.yml +++ b/repo2docker/buildpacks/legacy/root.frozen.yml @@ -1,25 +1,25 @@ # AUTO GENERATED FROM root.yml, DO NOT MANUALLY MODIFY -# Frozen on 2018-03-20 11:39:45 UTC +# Frozen on 2019-12-11 22:13:24 UTC name: root channels: + - https://repo.continuum.io/pkgs/free - defaults dependencies: + - _libgcc_mutex=0.1=main - alabaster=0.7.7=py27_0 - argcomplete=1.0.0=py27_1 - astropy=1.1.2=np110py27_0 - babel=2.2.0=py27_0 - backports_abc=0.4=py27_0 - beautifulsoup4=4.4.1=py27_0 - - bitarray=0.8.1=py27_0 - blaze=0.9.1=py27_0 - bokeh=0.11.1=py27_0 - boto=2.39.0=py27_0 - bottleneck=1.0.0=np110py27_0 - - ca-certificates=2017.08.26=h1d4fec5_0 - cairo=1.12.18=6 - - cdecimal=2.3=py27_0 - - certifi=2018.1.18=py27_0 + - certifi=2019.11.28=py27_0 - cffi=1.5.2=py27_0 + - chardet=3.0.4=py27_1003 - chest=0.2.3=py27_0 - cloudpickle=0.1.1=py27_0 - clyent=1.2.1=py27_0 @@ -39,7 +39,6 @@ dependencies: - enum34=1.1.2=py27_0 - et_xmlfile=1.0.1=py27_0 - fastcache=1.0.2=py27_0 - - flask=0.10.1=py27_1 - flask-cors=2.1.2=py27_0 - fontconfig=2.11.1=5 - freetype=2.5.5=0 @@ -47,13 +46,12 @@ dependencies: - futures=3.0.3=py27_0 - gevent=1.1.0=py27_0 - greenlet=0.4.9=py27_0 - - grin=1.2.1=py27_1 - h5py=2.5.0=np110py27_4 - hdf5=1.8.15.1=2 - heapdict=1.0.0=py27_0 - - idna=2.0=py27_0 + - idna=2.8=py27_0 - ipaddress=1.0.14=py27_0 - - ipykernel=4.8.2=py27_0 + - ipykernel=4.3.1=py27_0 - ipython=4.1.2=py27_1 - ipython_genutils=0.1.0=py27_0 - ipywidgets=4.1.1=py27_0 @@ -70,7 +68,7 @@ dependencies: - jupyter_core=4.1.0=py27_0 - libdynd=0.7.2=0 - libffi=3.0.13=0 - - libgcc-ng=7.2.0=hdf63c60_3 + - libgcc-ng=9.1.0=hdf63c60_0 - libgfortran=3.0=0 - libpng=1.6.17=0 - libsodium=1.0.3=0 @@ -98,7 +96,7 @@ dependencies: - numpy=1.10.4=py27_1 - odo=0.4.2=py27_0 - openpyxl=2.3.2=py27_0 - - openssl=1.0.2n=hb7f436b_0 + - openssl=1.0.2g=0 - pandas=0.18.0=np110py27_0 - partd=0.3.2=py27_1 - patchelf=0.8=0 @@ -108,7 +106,6 @@ dependencies: - pexpect=4.0.1=py27_0 - pickleshare=0.5=py27_0 - pillow=3.1.1=py27_0 - - pip=8.1.1=py27_1 - pixman=0.32.6=0 - ply=3.8=py27_0 - psutil=4.1.0=py27_0 @@ -116,15 +113,15 @@ dependencies: - py=1.4.31=py27_0 - pyasn1=0.1.9=py27_0 - pycairo=1.10.0=py27_0 - - pycosat=0.6.3=py27ha4109ae_0 + - pycosat=0.6.3=py27h14c3975_0 - pycparser=2.14=py27_0 - - pycrypto=2.6.1=py27_0 - pycurl=7.19.5.3=py27_0 - pyflakes=1.1.0=py27_0 - pygments=2.1.1=py27_0 - pyopenssl=16.2.0=py27_0 - pyparsing=2.0.3=py27_0 - pyqt=4.11.4=py27_1 + - pysocks=1.7.1=py27_0 - pytables=3.2.2=np110py27_1 - pytest=2.8.5=py27_0 - python=2.7.13=0 @@ -139,20 +136,19 @@ dependencies: - readline=6.2=2 - redis=2.6.9=0 - redis-py=2.10.3=py27_0 - - requests=2.12.4=py27_0 + - requests=2.22.0=py27_1 - rope=0.9.4=py27_1 - ruamel_yaml=0.11.14=py27_1 - scikit-image=0.12.3=np110py27_0 - scikit-learn=0.17.1=np110py27_0 - scipy=0.17.0=np110py27_2 - - setuptools=20.3=py27_0 + - setuptools=42.0.2=py27_0 - simplegeneric=0.8.1=py27_0 - singledispatch=3.4.0.3=py27_0 - sip=4.16.9=py27_0 - six=1.10.0=py27_0 - snowballstemmer=1.2.1=py27_0 - sockjs-tornado=1.0.1=py27_0 - - sphinx=1.3.5=py27_0 - sphinx_rtd_theme=0.1.9=py27_0 - spyder=2.3.8=py27_1 - sqlalchemy=1.0.12=py27_0 @@ -163,9 +159,11 @@ dependencies: - terminado=0.5=py27_1 - tk=8.5.18=0 - toolz=0.7.4=py27_0 - - tornado=4.5.3=py27_0 + - tornado=4.3=py27_0 + - tqdm=4.40.0=py_0 - traitlets=4.2.1=py27_0 - unicodecsv=0.14.1=py27_0 + - urllib3=1.25.7=py27_0 - util-linux=2.21=0 - werkzeug=0.11.4=py27_0 - wheel=0.29.0=py27_0 @@ -177,7 +175,11 @@ dependencies: - zeromq=4.1.3=0 - zlib=1.2.8=0 - pip: - - backports.ssl-match-hostname==3.4.0.2 - - dynd==0.7.3.dev1 - - tables==3.2.2 + - bitarray==0.8.1 + - cdecimal==2.3 + - flask==0.10.1 + - grin==1.2.1 + - pip==8.1.2 + - pycrypto==2.6.1 + - sphinx==1.3.5 diff --git a/repo2docker/buildpacks/legacy/root.yml b/repo2docker/buildpacks/legacy/root.yml index f4496121..abb02690 100644 --- a/repo2docker/buildpacks/legacy/root.yml +++ b/repo2docker/buildpacks/legacy/root.yml @@ -1,3 +1,3 @@ dependencies: - ipykernel==4.8.2 - - tornado<5 \ No newline at end of file + - tornado<5 From 1a1fd34391b63a6dac412c6f9212a917b3e520d0 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Fri, 17 Jan 2020 18:42:03 +0100 Subject: [PATCH 2/5] Remove support files for legacy buildpack --- .../buildpacks/legacy/apt-sources.list | 2 - repo2docker/buildpacks/legacy/freeze.py | 71 ----- .../buildpacks/legacy/python3.frozen.yml | 259 ------------------ repo2docker/buildpacks/legacy/python3.yml | 4 - repo2docker/buildpacks/legacy/root.frozen.yml | 185 ------------- repo2docker/buildpacks/legacy/root.yml | 3 - 6 files changed, 524 deletions(-) delete mode 100644 repo2docker/buildpacks/legacy/apt-sources.list delete mode 100755 repo2docker/buildpacks/legacy/freeze.py delete mode 100644 repo2docker/buildpacks/legacy/python3.frozen.yml delete mode 100644 repo2docker/buildpacks/legacy/python3.yml delete mode 100644 repo2docker/buildpacks/legacy/root.frozen.yml delete mode 100644 repo2docker/buildpacks/legacy/root.yml diff --git a/repo2docker/buildpacks/legacy/apt-sources.list b/repo2docker/buildpacks/legacy/apt-sources.list deleted file mode 100644 index 2e231844..00000000 --- a/repo2docker/buildpacks/legacy/apt-sources.list +++ /dev/null @@ -1,2 +0,0 @@ -deb http://archive.debian.org/debian jessie main -deb http://security.debian.org jessie/updates main diff --git a/repo2docker/buildpacks/legacy/freeze.py b/repo2docker/buildpacks/legacy/freeze.py deleted file mode 100755 index 5b2f80fe..00000000 --- a/repo2docker/buildpacks/legacy/freeze.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -""" -Freeze the conda environment.yml for legacy dockerfiles. - -It runs the freeze in the andrewosh/binder-base image used for legacy dockerfiles. - -Usage: - -python freeze.py [3.5] -""" - -from datetime import datetime -import os -import pathlib -import shutil -from subprocess import check_call -import sys - -# need conda ≥ 4.4 to avoid bug adding spurious pip dependencies -CONDA_VERSION = "4.7.10" - -HERE = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) - - -def freeze(env_name, env_file, frozen_file): - """Freeze a conda environment.yml - - By running in docker: - - conda env create - conda env export - - Result will be stored in frozen_file - """ - print(f"Freezing {env_file} -> {frozen_file}") - - with open(HERE / frozen_file, "w") as f: - f.write(f"# AUTO GENERATED FROM {env_file}, DO NOT MANUALLY MODIFY\n") - f.write(f"# Frozen on {datetime.utcnow():%Y-%m-%d %H:%M:%S UTC}\n") - - check_call( - [ - "docker", - "run", - "--rm", - "-v" f"{HERE}:/r2d", - "-it", - f"andrewosh/binder-base@sha256:eabde24f4c55174832ed8795faa40cea62fc9e2a4a9f1ee1444f8a2e4f9710ee", - "sh", - "-c", - "; ".join( - [ - "conda update -yq conda>=4.3", - f"conda install -y conda={CONDA_VERSION}", - "conda config --system --set auto_update_conda false", - f"conda env update -f /r2d/{env_file} -n {env_name}", - # exclude conda packages because we don't want to pin them - f"conda env export -n {env_name} | grep -v conda >> /r2d/{frozen_file}", - ] - ), - ] - ) - - -if __name__ == "__main__": - # allow specifying which env(s) to update on argv - env_names = sys.argv[1:] or ("root", "python3") - for env_name in env_names: - env_file = env_name + ".yml" - frozen_file = os.path.splitext(env_file)[0] + ".frozen.yml" - freeze(env_name, env_file, frozen_file) diff --git a/repo2docker/buildpacks/legacy/python3.frozen.yml b/repo2docker/buildpacks/legacy/python3.frozen.yml deleted file mode 100644 index 5698727a..00000000 --- a/repo2docker/buildpacks/legacy/python3.frozen.yml +++ /dev/null @@ -1,259 +0,0 @@ -# AUTO GENERATED FROM python3.yml, DO NOT MANUALLY MODIFY -# Frozen on 2019-12-11 21:33:39 UTC -name: python3 -channels: - - defaults -dependencies: - - _libgcc_mutex=0.1=main - - alabaster=0.7.12=py_0 - - asn1crypto=0.24.0=py35_0 - - astroid=1.6.5=py35_0 - - astropy=2.0.8=py35h035aef0_0 - - atomicwrites=1.3.0=py_0 - - attrs=19.3.0=py_0 - - babel=2.7.0=py_0 - - backcall=0.1.0=py35_0 - - backports=1.0=py_2 - - backports.shutil_get_terminal_size=1.0.0=py35_2 - - beautifulsoup4=4.6.3=py35_0 - - bitarray=0.8.3=py35h14c3975_0 - - bkcharts=0.2=py35he4f7e30_0 - - blas=1.0=mkl - - blaze=0.11.3=py35_0 - - bleach=3.1.0=py_0 - - blosc=1.16.3=hd408876_0 - - bokeh=0.13.0=py35_0 - - boto=2.49.0=py35_0 - - bottleneck=1.2.1=py35h035aef0_1 - - bzip2=1.0.8=h7b6447c_0 - - ca-certificates=2019.11.27=0 - - cairo=1.14.12=h8948797_3 - - certifi=2018.8.24=py35_1 - - cffi=1.11.5=py35he75722e_1 - - chardet=3.0.4=py35_1 - - click=7.0=py_0 - - cloudpickle=1.2.2=py_0 - - clyent=1.2.2=py35_1 - - colorama=0.4.1=py_0 - - contextlib2=0.6.0.post1=py_0 - - cryptography=2.3.1=py35hc365091_0 - - curl=7.61.0=h84994c4_0 - - cycler=0.10.0=py35hc4d5149_0 - - cython=0.28.5=py35hf484d3e_0 - - cytoolz=0.9.0.1=py35h14c3975_1 - - dask=0.19.2=py35_0 - - dask-core=0.19.2=py35_0 - - datashape=0.5.4=py35_1 - - dbus=1.13.12=h746ee38_0 - - decorator=4.4.1=py_0 - - defusedxml=0.6.0=py_0 - - distributed=1.23.2=py35_0 - - docutils=0.14=py35hd11081d_0 - - entrypoints=0.2.3=py35_2 - - et_xmlfile=1.0.1=py35hde8d43e_0 - - expat=2.2.6=he6710b0_0 - - fastcache=1.0.2=py35h14c3975_2 - - filelock=3.0.12=py_0 - - flask=1.1.1=py_0 - - flask-cors=3.0.8=py_0 - - fontconfig=2.13.0=h9420a91_0 - - freetype=2.9.1=h8a8886c_1 - - fribidi=1.0.5=h7b6447c_0 - - get_terminal_size=1.0.0=haa9412d_0 - - gevent=1.3.6=py35h7b6447c_0 - - glib=2.63.1=h5a9c865_0 - - glob2=0.7=py_0 - - gmp=6.1.2=h6c8ec71_1 - - gmpy2=2.0.8=py35hd0a1c9a_2 - - graphite2=1.3.13=h23475e2_0 - - greenlet=0.4.15=py35h7b6447c_0 - - gst-plugins-base=1.14.0=hbbd80ab_1 - - gstreamer=1.14.0=hb453b48_1 - - h5py=2.8.0=py35h989c5e5_3 - - harfbuzz=1.8.8=hffaf4a1_0 - - hdf5=1.10.2=hba1933b_1 - - heapdict=1.0.1=py_0 - - html5lib=1.0.1=py35_0 - - icu=58.2=h9c2bf20_1 - - idna=2.7=py35_0 - - imageio=2.4.1=py35_0 - - imagesize=1.1.0=py35_0 - - intel-openmp=2019.4=243 - - ipykernel=4.8.2=py35_0 - - ipython=6.5.0=py35_0 - - ipython_genutils=0.2.0=py35hc9e07d0_0 - - ipywidgets=7.4.1=py35_0 - - isort=4.3.4=py35_0 - - itsdangerous=1.1.0=py_0 - - jbig=2.1=hdba287a_0 - - jdcal=1.4.1=py_0 - - jedi=0.12.1=py35_0 - - jinja2=2.10.3=py_0 - - jpeg=9b=h024ee3a_2 - - json5=0.8.5=py_0 - - jsonschema=2.6.0=py35h4395190_0 - - jupyter=1.0.0=py35_7 - - jupyter_client=5.3.3=py_0 - - jupyter_console=5.2.0=py35h4044a63_1 - - jupyter_core=4.5.0=py_0 - - jupyterlab=1.2.3=pyhf63ae98_0 - - jupyterlab_launcher=0.13.1=py35_0 - - jupyterlab_server=1.0.0=py_0 - - kiwisolver=1.0.1=py35hf484d3e_0 - - lazy-object-proxy=1.3.1=py35h14c3975_2 - - libcurl=7.61.0=h1ad7b7a_0 - - libedit=3.1.20181209=hc058e9b_0 - - libffi=3.2.1=hd88cf55_4 - - libgcc-ng=9.1.0=hdf63c60_0 - - libgfortran-ng=7.3.0=hdf63c60_0 - - libpng=1.6.37=hbc83047_0 - - libsodium=1.0.16=h1bed415_0 - - libssh2=1.8.0=h9cfc8f7_4 - - libstdcxx-ng=9.1.0=hdf63c60_0 - - libtiff=4.1.0=h2733197_0 - - libtool=2.4.6=h7b6447c_5 - - libuuid=1.0.3=h1bed415_2 - - libxcb=1.13=h1bed415_1 - - libxml2=2.9.9=hea5a465_1 - - libxslt=1.1.33=h7d1a2b0_0 - - llvmlite=0.24.0=py35hdbcaa40_0 - - locket=0.2.0=py35h170bc82_1 - - lxml=4.2.5=py35hefd8a0e_0 - - lz4-c=1.8.1.2=h14c3975_0 - - lzo=2.10=h49e0be7_2 - - markupsafe=1.0=py35h14c3975_1 - - matplotlib=3.0.0=py35h5429711_0 - - mccabe=0.6.1=py35_1 - - mistune=0.8.3=py35h14c3975_1 - - mkl=2018.0.3=1 - - mkl-service=1.1.2=py35h90e4bf4_5 - - more-itertools=4.3.0=py35_0 - - mpc=1.0.3=hec55b23_5 - - mpfr=3.1.5=h11a74b3_2 - - mpmath=1.0.0=py35_2 - - msgpack-python=0.5.6=py35h6bb024c_1 - - multipledispatch=0.6.0=py35_0 - - nbconvert=5.5.0=py_0 - - nbformat=4.4.0=py35h12e6e07_0 - - ncurses=6.1=he6710b0_1 - - networkx=2.4=py_0 - - nltk=3.3.0=py35_0 - - nose=1.3.7=py35_2 - - notebook=5.4.1=py35_0 - - numba=0.39.0=py35h04863e7_0 - - numexpr=2.6.8=py35hd89afb7_0 - - numpy=1.14.2=py35hdbf6ddf_0 - - numpydoc=0.9.1=py_0 - - odo=0.5.1=py35h102315f_0 - - olefile=0.46=py35_0 - - openpyxl=2.6.3=py_0 - - openssl=1.0.2t=h7b6447c_1 - - packaging=19.2=py_0 - - pandas=0.23.4=py35h04863e7_0 - - pandoc=2.2.3.2=0 - - pandocfilters=1.4.2=py35_1 - - pango=1.42.4=h049681c_0 - - parso=0.5.1=py_0 - - partd=1.1.0=py_0 - - patchelf=0.10=he6710b0_0 - - path.py=11.1.0=py35_0 - - pathlib2=2.3.2=py35_0 - - patsy=0.5.0=py35_0 - - pcre=8.43=he6710b0_0 - - pep8=1.7.1=py35_0 - - pexpect=4.6.0=py35_0 - - pickleshare=0.7.4=py35hd57304d_0 - - pillow=5.2.0=py35heded4f4_0 - - pip=10.0.1=py35_0 - - pixman=0.38.0=h7b6447c_0 - - pkginfo=1.4.2=py35_1 - - pluggy=0.11.0=py_0 - - ply=3.11=py35_0 - - prompt_toolkit=1.0.15=py35hc09de7a_0 - - psutil=5.4.7=py35h14c3975_0 - - ptyprocess=0.6.0=py35_0 - - py=1.8.0=py_0 - - pycodestyle=2.4.0=py35_0 - - pycosat=0.6.3=py35h14c3975_0 - - pycparser=2.19=py35_0 - - pycrypto=2.6.1=py35h14c3975_8 - - pycurl=7.43.0.2=py35hb7f436b_0 - - pyflakes=2.0.0=py35_0 - - pygments=2.5.2=py_0 - - pylint=1.9.2=py35_0 - - pyodbc=4.0.24=py35he6710b0_0 - - pyopenssl=18.0.0=py35_0 - - pyparsing=2.4.5=py_0 - - pyqt=5.9.2=py35h05f1152_2 - - pysocks=1.6.8=py35_0 - - pytables=3.4.4=py35ha205bf6_0 - - pytest=3.8.1=py35_0 - - python=3.5.6=hc3d631a_0 - - python-dateutil=2.8.1=py_0 - - pytz=2019.3=py_0 - - pywavelets=1.0.0=py35hdd07704_0 - - pyyaml=3.13=py35h14c3975_0 - - pyzmq=17.1.2=py35h14c3975_0 - - qt=5.9.6=h8703b6f_2 - - qtawesome=0.6.0=py_0 - - qtconsole=4.6.0=py_0 - - qtpy=1.9.0=py_0 - - readline=7.0=h7b6447c_5 - - requests=2.19.1=py35_0 - - rope=0.14.0=py_0 - - ruamel_yaml=0.15.46=py35h14c3975_0 - - scikit-image=0.14.0=py35hf484d3e_1 - - scikit-learn=0.20.0=py35h4989274_1 - - scipy=1.1.0=py35hd20e5f9_0 - - seaborn=0.9.0=pyh91ea838_1 - - send2trash=1.5.0=py35_0 - - setuptools=40.2.0=py35_0 - - simplegeneric=0.8.1=py35_2 - - singledispatch=3.4.0.3=py35h0cd4ec3_0 - - sip=4.19.8=py35hf484d3e_0 - - six=1.11.0=py35_1 - - snappy=1.1.7=hbae5bb6_3 - - snowballstemmer=2.0.0=py_0 - - sortedcollections=1.1.1=py_0 - - sortedcontainers=2.0.5=py35_0 - - sphinx=2.2.2=py_0 - - sphinxcontrib=1.0=py35_1 - - sphinxcontrib-applehelp=1.0.1=py_0 - - sphinxcontrib-devhelp=1.0.1=py_0 - - sphinxcontrib-htmlhelp=1.0.2=py_0 - - sphinxcontrib-jsmath=1.0.1=py_0 - - sphinxcontrib-qthelp=1.0.2=py_0 - - sphinxcontrib-serializinghtml=1.1.3=py_0 - - sphinxcontrib-websupport=1.1.2=py_0 - - spyder=3.2.8=py35_0 - - sqlalchemy=1.2.11=py35h7b6447c_0 - - sqlite=3.30.1=h7b6447c_0 - - statsmodels=0.9.0=py35h3010b51_0 - - sympy=1.2=py35_0 - - tblib=1.5.0=py_0 - - terminado=0.8.1=py35_1 - - testpath=0.4.4=py_0 - - tk=8.6.8=hbc83047_0 - - toolz=0.10.0=py_0 - - tornado=4.5.3=py35_0 - - traitlets=4.3.2=py35ha522a97_0 - - typing=3.6.6=py35_0 - - unicodecsv=0.14.1=py35h4805c0c_0 - - unixodbc=2.3.7=h14c3975_0 - - urllib3=1.23=py35_0 - - wcwidth=0.1.7=py35hcd08066_0 - - webencodings=0.5.1=py35_1 - - werkzeug=0.16.0=py_0 - - wheel=0.31.1=py35_0 - - widgetsnbextension=3.4.1=py35_0 - - wrapt=1.10.11=py35h14c3975_2 - - xlrd=1.2.0=py_0 - - xlsxwriter=1.2.6=py_0 - - xlwt=1.3.0=py35h884a0cf_0 - - xz=5.2.4=h14c3975_4 - - yaml=0.1.7=had09818_2 - - zeromq=4.2.5=hf484d3e_1 - - zict=1.0.0=py_0 - - zlib=1.2.11=h7b6447c_3 - - zstd=1.3.7=h0b5b093_0 - diff --git a/repo2docker/buildpacks/legacy/python3.yml b/repo2docker/buildpacks/legacy/python3.yml deleted file mode 100644 index 46ece2d8..00000000 --- a/repo2docker/buildpacks/legacy/python3.yml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: - - notebook==5.4.1 - - ipykernel==4.8.2 - - tornado<5 diff --git a/repo2docker/buildpacks/legacy/root.frozen.yml b/repo2docker/buildpacks/legacy/root.frozen.yml deleted file mode 100644 index f338522f..00000000 --- a/repo2docker/buildpacks/legacy/root.frozen.yml +++ /dev/null @@ -1,185 +0,0 @@ -# AUTO GENERATED FROM root.yml, DO NOT MANUALLY MODIFY -# Frozen on 2019-12-11 22:13:24 UTC -name: root -channels: - - https://repo.continuum.io/pkgs/free - - defaults -dependencies: - - _libgcc_mutex=0.1=main - - alabaster=0.7.7=py27_0 - - argcomplete=1.0.0=py27_1 - - astropy=1.1.2=np110py27_0 - - babel=2.2.0=py27_0 - - backports_abc=0.4=py27_0 - - beautifulsoup4=4.4.1=py27_0 - - blaze=0.9.1=py27_0 - - bokeh=0.11.1=py27_0 - - boto=2.39.0=py27_0 - - bottleneck=1.0.0=np110py27_0 - - cairo=1.12.18=6 - - certifi=2019.11.28=py27_0 - - cffi=1.5.2=py27_0 - - chardet=3.0.4=py27_1003 - - chest=0.2.3=py27_0 - - cloudpickle=0.1.1=py27_0 - - clyent=1.2.1=py27_0 - - colorama=0.3.7=py27_0 - - configobj=5.0.6=py27_0 - - cryptography=1.4=py27_0 - - curl=7.45.0=0 - - cycler=0.10.0=py27_0 - - cython=0.23.4=py27_0 - - cytoolz=0.7.5=py27_0 - - dask=0.8.1=py27_0 - - datashape=0.5.1=py27_0 - - decorator=4.0.9=py27_0 - - dill=0.2.4=py27_0 - - docutils=0.12=py27_0 - - dynd-python=0.7.2=py27_0 - - enum34=1.1.2=py27_0 - - et_xmlfile=1.0.1=py27_0 - - fastcache=1.0.2=py27_0 - - flask-cors=2.1.2=py27_0 - - fontconfig=2.11.1=5 - - freetype=2.5.5=0 - - funcsigs=0.4=py27_0 - - futures=3.0.3=py27_0 - - gevent=1.1.0=py27_0 - - greenlet=0.4.9=py27_0 - - h5py=2.5.0=np110py27_4 - - hdf5=1.8.15.1=2 - - heapdict=1.0.0=py27_0 - - idna=2.8=py27_0 - - ipaddress=1.0.14=py27_0 - - ipykernel=4.3.1=py27_0 - - ipython=4.1.2=py27_1 - - ipython_genutils=0.1.0=py27_0 - - ipywidgets=4.1.1=py27_0 - - itsdangerous=0.24=py27_0 - - jbig=2.1=0 - - jdcal=1.2=py27_0 - - jedi=0.9.0=py27_0 - - jinja2=2.8=py27_0 - - jpeg=8d=0 - - jsonschema=2.4.0=py27_0 - - jupyter=1.0.0=py27_2 - - jupyter_client=4.2.2=py27_0 - - jupyter_console=4.1.1=py27_0 - - jupyter_core=4.1.0=py27_0 - - libdynd=0.7.2=0 - - libffi=3.0.13=0 - - libgcc-ng=9.1.0=hdf63c60_0 - - libgfortran=3.0=0 - - libpng=1.6.17=0 - - libsodium=1.0.3=0 - - libtiff=4.0.6=1 - - libxml2=2.9.2=0 - - libxslt=1.1.28=0 - - llvmlite=0.9.0=py27_0 - - locket=0.2.0=py27_0 - - lxml=3.6.0=py27_0 - - markupsafe=0.23=py27_0 - - matplotlib=1.5.1=np110py27_0 - - mistune=0.7.2=py27_0 - - mkl=11.3.1=0 - - mkl-service=1.1.2=py27_0 - - mpmath=0.19=py27_0 - - multipledispatch=0.4.8=py27_0 - - nbconvert=4.1.0=py27_0 - - nbformat=4.0.1=py27_0 - - networkx=1.11=py27_0 - - nltk=3.2=py27_0 - - nose=1.3.7=py27_0 - - notebook=4.1.0=py27_1 - - numba=0.24.0=np110py27_0 - - numexpr=2.5=np110py27_0 - - numpy=1.10.4=py27_1 - - odo=0.4.2=py27_0 - - openpyxl=2.3.2=py27_0 - - openssl=1.0.2g=0 - - pandas=0.18.0=np110py27_0 - - partd=0.3.2=py27_1 - - patchelf=0.8=0 - - path.py=8.1.2=py27_1 - - patsy=0.4.0=np110py27_0 - - pep8=1.7.0=py27_0 - - pexpect=4.0.1=py27_0 - - pickleshare=0.5=py27_0 - - pillow=3.1.1=py27_0 - - pixman=0.32.6=0 - - ply=3.8=py27_0 - - psutil=4.1.0=py27_0 - - ptyprocess=0.5=py27_0 - - py=1.4.31=py27_0 - - pyasn1=0.1.9=py27_0 - - pycairo=1.10.0=py27_0 - - pycosat=0.6.3=py27h14c3975_0 - - pycparser=2.14=py27_0 - - pycurl=7.19.5.3=py27_0 - - pyflakes=1.1.0=py27_0 - - pygments=2.1.1=py27_0 - - pyopenssl=16.2.0=py27_0 - - pyparsing=2.0.3=py27_0 - - pyqt=4.11.4=py27_1 - - pysocks=1.7.1=py27_0 - - pytables=3.2.2=np110py27_1 - - pytest=2.8.5=py27_0 - - python=2.7.13=0 - - python-dateutil=2.5.1=py27_0 - - pytz=2016.2=py27_0 - - pyyaml=3.11=py27_1 - - pyzmq=15.2.0=py27_0 - - qt=4.8.7=1 - - qtawesome=0.3.2=py27_0 - - qtconsole=4.2.0=py27_0 - - qtpy=1.0=py27_0 - - readline=6.2=2 - - redis=2.6.9=0 - - redis-py=2.10.3=py27_0 - - requests=2.22.0=py27_1 - - rope=0.9.4=py27_1 - - ruamel_yaml=0.11.14=py27_1 - - scikit-image=0.12.3=np110py27_0 - - scikit-learn=0.17.1=np110py27_0 - - scipy=0.17.0=np110py27_2 - - setuptools=42.0.2=py27_0 - - simplegeneric=0.8.1=py27_0 - - singledispatch=3.4.0.3=py27_0 - - sip=4.16.9=py27_0 - - six=1.10.0=py27_0 - - snowballstemmer=1.2.1=py27_0 - - sockjs-tornado=1.0.1=py27_0 - - sphinx_rtd_theme=0.1.9=py27_0 - - spyder=2.3.8=py27_1 - - sqlalchemy=1.0.12=py27_0 - - sqlite=3.13.0=0 - - ssl_match_hostname=3.4.0.2=py27_0 - - statsmodels=0.6.1=np110py27_0 - - sympy=1.0=py27_0 - - terminado=0.5=py27_1 - - tk=8.5.18=0 - - toolz=0.7.4=py27_0 - - tornado=4.3=py27_0 - - tqdm=4.40.0=py_0 - - traitlets=4.2.1=py27_0 - - unicodecsv=0.14.1=py27_0 - - urllib3=1.25.7=py27_0 - - util-linux=2.21=0 - - werkzeug=0.11.4=py27_0 - - wheel=0.29.0=py27_0 - - xlrd=0.9.4=py27_0 - - xlsxwriter=0.8.4=py27_0 - - xlwt=1.0.0=py27_0 - - xz=5.0.5=1 - - yaml=0.1.6=0 - - zeromq=4.1.3=0 - - zlib=1.2.8=0 - - pip: - - bitarray==0.8.1 - - cdecimal==2.3 - - flask==0.10.1 - - grin==1.2.1 - - pip==8.1.2 - - pycrypto==2.6.1 - - sphinx==1.3.5 - diff --git a/repo2docker/buildpacks/legacy/root.yml b/repo2docker/buildpacks/legacy/root.yml deleted file mode 100644 index abb02690..00000000 --- a/repo2docker/buildpacks/legacy/root.yml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - - ipykernel==4.8.2 - - tornado<5 From 9cfdb9b5f483741bda50fc31c7fea7a86fa0544c Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sat, 25 Jan 2020 07:35:00 +0100 Subject: [PATCH 3/5] Add test for deprecated legacy buildpack Tests that the legacy buildpack raises exceptions when it is triggered. --- tests/dockerfile/legacy/Dockerfile | 14 ----------- tests/dockerfile/legacy/README.rst | 8 ------- tests/dockerfile/legacy/verify | 7 ------ tests/unit/test_buildpack.py | 37 ++++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 29 deletions(-) delete mode 100644 tests/dockerfile/legacy/Dockerfile delete mode 100644 tests/dockerfile/legacy/README.rst delete mode 100755 tests/dockerfile/legacy/verify create mode 100644 tests/unit/test_buildpack.py diff --git a/tests/dockerfile/legacy/Dockerfile b/tests/dockerfile/legacy/Dockerfile deleted file mode 100644 index 1540e264..00000000 --- a/tests/dockerfile/legacy/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM andrewosh/binder-base - -USER root - -# Add Julia dependencies -RUN apt-get update -RUN apt-get install -y julia libnettle4 && apt-get clean - -USER main - -# Install Julia kernel -RUN julia -e 'Pkg.add("IJulia")' - -ADD verify verify diff --git a/tests/dockerfile/legacy/README.rst b/tests/dockerfile/legacy/README.rst deleted file mode 100644 index 0e070d00..00000000 --- a/tests/dockerfile/legacy/README.rst +++ /dev/null @@ -1,8 +0,0 @@ -Docker - Legacy Dockerfiles ---------------------------- - -This demonstrates the Dockerfile syntax that was often found in the first -version of Binder. It sources the ``andrewosh`` Docker image, which -contained many different dependencies, then installs Julia. We encourage -users to source one of the Jupyter base images as they are more streamlined, -reliable, and efficient. diff --git a/tests/dockerfile/legacy/verify b/tests/dockerfile/legacy/verify deleted file mode 100755 index 5fd1485c..00000000 --- a/tests/dockerfile/legacy/verify +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -assert sys.version_info[:2] == (3, 5), sys.version - -import jupyter diff --git a/tests/unit/test_buildpack.py b/tests/unit/test_buildpack.py new file mode 100644 index 00000000..448eea84 --- /dev/null +++ b/tests/unit/test_buildpack.py @@ -0,0 +1,37 @@ +from os.path import join as pjoin + +import pytest +from tempfile import TemporaryDirectory +from repo2docker.buildpacks import LegacyBinderDockerBuildPack +from repo2docker.utils import chdir + + +def test_legacy_raises(): + # check legacy buildpack raises on a repo that triggers it + with TemporaryDirectory() as repodir: + with open(pjoin(repodir, "Dockerfile"), "w") as d: + d.write("FROM andrewosh/binder-base") + + with chdir(repodir): + bp = LegacyBinderDockerBuildPack() + with pytest.raises(RuntimeError): + bp.detect() + + +def test_legacy_doesnt_detect(): + # check legacy buildpack doesn't trigger + with TemporaryDirectory() as repodir: + with open(pjoin(repodir, "Dockerfile"), "w") as d: + d.write("FROM andrewosh/some-image") + + with chdir(repodir): + bp = LegacyBinderDockerBuildPack() + assert not bp.detect() + + +def test_legacy_on_repo_without_dockerfile(): + # check legacy buildpack doesn't trigger on a repo w/o Dockerfile + with TemporaryDirectory() as repodir: + with chdir(repodir): + bp = LegacyBinderDockerBuildPack() + assert not bp.detect() From 4598a08ff9f92e462a6da47341881677b5a6b7e7 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sat, 25 Jan 2020 07:42:14 +0100 Subject: [PATCH 4/5] Remove a test of legacy buildpack --- tests/unit/test_cache_from.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/unit/test_cache_from.py b/tests/unit/test_cache_from.py index dc558100..77797b12 100644 --- a/tests/unit/test_cache_from.py +++ b/tests/unit/test_cache_from.py @@ -50,23 +50,3 @@ def test_cache_from_docker(tmpdir): called_args, called_kwargs = fake_client.build.call_args assert "cache_from" in called_kwargs assert called_kwargs["cache_from"] == cache_from - - -def test_cache_from_legacy(tmpdir): - cache_from = ["image-1:latest"] - fake_log_value = {"stream": "fake"} - fake_client = MagicMock(spec=docker.APIClient) - fake_client.build.return_value = iter([fake_log_value]) - extra_build_kwargs = {"somekey": "somevalue"} - - # Test legacy docker image - with tmpdir.join("Dockerfile").open("w") as f: - f.write("FROM andrewosh/binder-base\n") - - for line in LegacyBinderDockerBuildPack().build( - fake_client, "image-2", 100, {}, cache_from, extra_build_kwargs - ): - assert line == fake_log_value - called_args, called_kwargs = fake_client.build.call_args - assert "cache_from" in called_kwargs - assert called_kwargs["cache_from"] == cache_from From 88b6a1f6c4efa31aff997af85d445754ff7f00ab Mon Sep 17 00:00:00 2001 From: Tim Head Date: Sat, 25 Jan 2020 14:29:17 +0100 Subject: [PATCH 5/5] Replace deprecated with removed Co-Authored-By: Simon Li --- repo2docker/buildpacks/legacy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo2docker/buildpacks/legacy/__init__.py b/repo2docker/buildpacks/legacy/__init__.py index 4a8fd9af..7f5d004f 100644 --- a/repo2docker/buildpacks/legacy/__init__.py +++ b/repo2docker/buildpacks/legacy/__init__.py @@ -25,7 +25,7 @@ class LegacyBinderDockerBuildPack: if line.startswith("FROM"): if "andrewosh/binder-base" in line.split("#")[0].lower(): log.error( - "The legacy buildpack was deprecated in January 2020." + "The legacy buildpack was removed in January 2020." ) log.error( "Please see https://repo2docker.readthedocs.io/en/"