File tree Expand file tree Collapse file tree
development/python-modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,17 @@ buildPythonPackage rec {
4040 nbval
4141 ] ;
4242
43+ # Tests bind ports
44+ __darwinAllowLocalNetworking = true ;
45+
46+ pytestFlagsArray = [
47+ # https://github.com/vidartf/ipydatawidgets/issues/62
48+ "--deselect=ipydatawidgets/tests/test_ndarray_trait.py::test_dtype_coerce"
49+
50+ # https://github.com/vidartf/ipydatawidgets/issues/63
51+ "--deselect=examples/test.ipynb::Cell\\ \ 3"
52+ ] ;
53+
4354 meta = {
4455 description = "Widgets to help facilitate reuse of large datasets across different widgets" ;
4556 homepage = "https://github.com/vidartf/ipydatawidgets" ;
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchPypi ,
5+
6+ jupyterlab ,
7+ setuptools ,
8+
9+ ipywidgets ,
10+ ipydatawidgets ,
11+ numpy ,
12+ traitlets ,
13+ } :
14+
15+ buildPythonPackage rec {
16+ pname = "pythreejs" ;
17+ version = "2.4.2" ;
18+ pyproject = true ;
19+
20+ # github sources need to invoke npm, but no package-lock.json present:
21+ # https://github.com/jupyter-widgets/pythreejs/issues/419
22+ src = fetchPypi {
23+ inherit pname version ;
24+ hash = "sha256-pWi/3Ew3l8TCM5FYko7cfc9vpKJnsI487FEh4geLW9Y=" ;
25+ } ;
26+
27+ build-system = [
28+ jupyterlab
29+ setuptools
30+ ] ;
31+
32+ # It seems pythonRelaxDeps doesn't work for these
33+ postPatch = ''
34+ substituteInPlace pyproject.toml \
35+ --replace-fail "jupyterlab~=" "jupyterlab>="
36+
37+ # https://github.com/jupyter-widgets/pythreejs/pull/420
38+ substituteInPlace setupbase.py \
39+ --replace-fail "import pipes" "" \
40+ --replace-fail "pipes.quote" "shlex.quote"
41+ '' ;
42+
43+ # Don't run npm install, all files are already where they should be present.
44+ # If we would run npm install, npm would detect package-lock.json is an old format,
45+ # and try to fetch more metadata from the registry, which cannot work in the sandbox.
46+ setupPyBuildFlags = [ "--skip-npm" ] ;
47+
48+ dependencies = [
49+ ipywidgets
50+ ipydatawidgets
51+ numpy
52+ traitlets
53+ ] ;
54+
55+ # There are no tests
56+ doCheck = false ;
57+
58+ pythonImportsCheck = [ "pythreejs" ] ;
59+
60+ meta = {
61+ description = "Interactive 3D graphics for the Jupyter Notebook and JupyterLab, using Three.js and Jupyter Widgets" ;
62+ homepage = "https://github.com/jupyter-widgets/pythreejs" ;
63+ changelog = "https://github.com/jupyter-widgets/pythreejs/releases/tag/${ version } " ;
64+ license = lib . licenses . bsd3 ;
65+ maintainers = with lib . maintainers ; [ flokli ] ;
66+ } ;
67+ }
Original file line number Diff line number Diff line change 1+ diff --git a/setupbase.py b/setupbase.py
2+ index 0ce0ac8..7762e23 100644
3+ --- a/setupbase.py
4+ +++ b/setupbase.py
5+ @@ -659,7 +659,7 @@ def _translate_glob(pat):
6+ translated_parts.append(_translate_glob_part(part))
7+ os_sep_class = '[%s]' % re.escape(SEPARATORS)
8+ res = _join_translated(translated_parts, os_sep_class)
9+ - return '{res}\\Z(?ms)'.format(res=res)
10+ + return '(?ms){res}\\Z'.format(res=res)
11+
12+
13+ def _join_translated(translated_parts, os_sep_class):
Original file line number Diff line number Diff line change @@ -14363,6 +14363,8 @@ self: super: with self; {
1436314363
1436414364 pythran = callPackage ../development/python-modules/pythran { inherit (pkgs.llvmPackages) openmp; };
1436514365
14366+ pythreejs = callPackage ../development/python-modules/pythreejs { };
14367+
1436614368 pytibber = callPackage ../development/python-modules/pytibber { };
1436714369
1436814370 pytikz-allefeld = callPackage ../development/python-modules/pytikz-allefeld { };
You can’t perform that action at this time.
0 commit comments