1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, hatchling 6, hatch-jupyter-builder 7, jupyterlab 8, jupyter-packaging 9, ipywidgets 10, numpy 11, traitlets 12, traittypes 13}: 14 15buildPythonPackage rec { 16 pname = "bqscales"; 17 version = "0.3.3"; 18 format = "pyproject"; 19 disabled = pythonOlder "3.6"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-SlnNw4dWOzRedwIN3kCyl95qVqkY92QGOMS3Eyoqk0I="; 24 }; 25 26 # We relax dependencies here instead of pulling in a patch because upstream 27 # has released a new version using hatch-jupyter-builder, but it is not yet 28 # trivial to upgrade to that. 29 # 30 # Per https://github.com/bqplot/bqscales/issues/76, jupyterlab is not needed 31 # as a build dependency right now. 32 # 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace '"jupyterlab==3.*",' "" \ 36 --replace 'jupyter_packaging~=' 'jupyter_packaging>=' 37 ''; 38 39 nativeBuildInputs = [ 40 hatch-jupyter-builder 41 hatchling 42 jupyterlab 43 jupyter-packaging 44 ]; 45 46 propagatedBuildInputs = [ 47 ipywidgets 48 numpy 49 traitlets 50 traittypes 51 ]; 52 53 # no tests in PyPI dist 54 doCheck = false; 55 56 pythonImportsCheck = [ "bqscales" ]; 57 58 meta = { 59 description = "Grammar of Graphics scales for bqplot and other Jupyter widgets libraries"; 60 homepage = "https://github.com/bqplot/bqscales"; 61 license = lib.licenses.asl20; 62 maintainers = with lib.maintainers; [ bcdarwin ]; 63 }; 64}