1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 jinja2,
8 jupyterhub,
9 pythonOlder,
10 pytest-asyncio,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "batchspawner";
16 version = "1.3.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "jupyterhub";
23 repo = "batchspawner";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-Z7kB8b7s11wokTachLI/N+bdUV+FfCRTemL1KYQpzio=";
26 };
27
28 build-system = [
29 setuptools
30 wheel
31 ];
32
33 dependencies = [
34 jinja2
35 jupyterhub
36 ];
37
38 preCheck = ''
39 substituteInPlace pyproject.toml \
40 --replace-fail "--cov=batchspawner" ""
41 '';
42
43 nativeCheckInputs = [
44 pytest-asyncio
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [ "batchspawner" ];
49
50 meta = with lib; {
51 description = "A spawner for Jupyterhub to spawn notebooks using batch resource managers";
52 mainProgram = "batchspawner-singleuser";
53 homepage = "https://github.com/jupyterhub/batchspawner";
54 changelog = "https://github.com/jupyterhub/batchspawner/blob/v${version}/CHANGELOG.md";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ ];
57 };
58}