1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 pytestCheckHook,
7 nodejs,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "pscript";
13 version = "0.8.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "flexxui";
20 repo = "pscript";
21 tag = "v${version}";
22 hash = "sha256-pqjig3dFJ4zfpor6TT6fiBMS7lAtJE/bAYbzl46W/YY=";
23 };
24
25 build-system = [ flit-core ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 nodejs
30 ];
31
32 preCheck = ''
33 # do not execute legacy tests
34 rm -rf pscript_legacy
35 '';
36
37 pythonImportsCheck = [ "pscript" ];
38
39 disabledTests = [
40 # https://github.com/flexxui/pscript/issues/69
41 "test_async_and_await"
42 ];
43
44 meta = with lib; {
45 description = "Python to JavaScript compiler";
46 homepage = "https://pscript.readthedocs.io";
47 changelog = "https://github.com/flexxui/pscript/blob/${src.tag}/docs/releasenotes.rst";
48 license = licenses.bsd2;
49 maintainers = with maintainers; [ matthiasbeyer ];
50 };
51}