1{
2 lib,
3 buildPythonPackage,
4 cmake,
5 fetchFromGitHub,
6 future,
7 numpy,
8 pytest-lazy-fixture,
9 pytestCheckHook,
10 pythonOlder,
11 scikit-build,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "parselmouth";
17 version = "0.4.6";
18 pyproject = true;
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "YannickJadoul";
23 repo = "Parselmouth";
24 tag = "v${version}";
25 fetchSubmodules = true;
26 hash = "sha256-ish9FQWdDCJ54S3s3ELZa40ttCs3opTRtFAQNg9lEIM=";
27 };
28
29 configurePhase = ''
30 # doesn't happen automatically
31 export MAKEFLAGS=-j$NIX_BUILD_CORES
32 '';
33
34 build-system = [
35 cmake
36 scikit-build
37 setuptools
38 ];
39
40 dontUseCmakeConfigure = true;
41
42 dependencies = [ numpy ];
43
44 nativeCheckInputs = [
45 future
46 pytest-lazy-fixture
47 pytestCheckHook
48 ];
49
50 pytestFlags = [
51 "--run-praat-tests"
52 "-v"
53 ];
54
55 pythonImportsCheck = [ "parselmouth" ];
56
57 meta = {
58 description = "Praat in Python, the Pythonic way";
59 homepage = "https://github.com/YannickJadoul/Parselmouth";
60 changelog = "https://github.com/YannickJadoul/Parselmouth/releases/tag/${src.tag}";
61 license = lib.licenses.gpl3Plus;
62 maintainers = with lib.maintainers; [ derdennisop ];
63 };
64}