kopia lustrzana https://github.com/jupyterhub/repo2docker
import downgrade test
rather than building old xeus-cling, which requires a downgrade of Python from 3.10 to 3.9, which is _not_ supported, run the build with a 3.9 pin. This still results in patch-level downgrade of Python, major downgrade of openssl, etc.pull/1219/head
rodzic
fbab2cd330
commit
abe2cc8598
|
@ -0,0 +1,11 @@
|
|||
# originally xeus-cling@0.6.0
|
||||
# added python=3.9 pin because implicit downgrade of Python from 3.10 to 3.9 isn't allowed
|
||||
name: xeus-cling
|
||||
channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.9
|
||||
- xeus-cling=0.6.0
|
||||
- xtensor=0.20.8
|
||||
- xtensor-blas=0.16.1
|
||||
- notebook
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python3
|
||||
import json
|
||||
import pprint
|
||||
from subprocess import check_output
|
||||
|
||||
|
||||
def json_sh(cmd):
|
||||
"""Run a command that produces JSON on stdout and return the parsed result"""
|
||||
buf = check_output(cmd)
|
||||
return json.loads(buf.decode("utf8", "replace"))
|
||||
|
||||
|
||||
conda_pkg_list = json_sh(["conda", "list", "--json"])
|
||||
pprint.pprint(conda_pkg_list)
|
||||
# make it a dict
|
||||
pkgs = {pkg["name"]: pkg for pkg in conda_pkg_list}
|
||||
|
||||
# base env resolved
|
||||
assert pkgs["python"]["version"].startswith("3.9"), pkgs["python"]
|
||||
assert "xeus-cling" in pkgs
|
||||
assert pkgs["xeus-cling"]["version"] == "0.6.0"
|
||||
|
||||
# verify downgrade
|
||||
# this may be brittle, but it's unlikely any of these old versions
|
||||
# of packages will be rebuilt
|
||||
# xeus-cling 0.6.0 pins xeus 0.20, which pins openssl 1.1.1,
|
||||
# which in turn downgrades Python from >=3.9.16 to 3.9.6
|
||||
|
||||
assert pkgs["openssl"]["version"].startswith("1.1.1"), pkgs["openssl"]["version"]
|
||||
assert pkgs["python"]["version"] == "3.9.6", pkgs["python"]["version"]
|
|
@ -24,12 +24,6 @@
|
|||
url: https://github.com/binder-examples/requirements
|
||||
ref: python-3.7
|
||||
verify: python -c 'import matplotlib'
|
||||
# Test that custom channels and downgrades don't
|
||||
# get blocked by pinning
|
||||
- name: Xeus-Cling
|
||||
url: https://github.com/QuantStack/xeus-cling
|
||||
ref: 0.6.0
|
||||
verify: jupyter kernelspec list
|
||||
# Zenodo record of https://github.com/binder-examples/requirements
|
||||
- name: 10.5281/zenodo.3242074
|
||||
url: 10.5281/zenodo.3242074
|
||||
|
|
Ładowanie…
Reference in New Issue