1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 tokenize-rt,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "unasync";
12 version = "0.6.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "python-trio";
17 repo = "unasync";
18 rev = "v${version}";
19 sha256 = "sha256-ZRvmX1fSfSJ1HNEymzhIuUi3tdjFmUoidfr0rN8c7tk=";
20 };
21
22 build-system = [ setuptools ];
23
24 dependencies = [
25 setuptools
26 tokenize-rt
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 disabledTests = [
32 # mess with $PYTHONPATH
33 "test_build_py_modules"
34 "test_build_py_packages"
35 "test_project_structure_after_build_py_packages"
36 "test_project_structure_after_customized_build_py_packages"
37 ];
38
39 pythonImportsCheck = [ "unasync" ];
40
41 meta = with lib; {
42 changelog = "https://github.com/python-trio/unasync/releases/tag/v${version}";
43 description = "Project that can transform your asynchronous code into synchronous code";
44 homepage = "https://github.com/python-trio/unasync";
45 license = with licenses; [
46 mit # or
47 asl20
48 ];
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}