1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 setuptools,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "pyquaternion";
12 version = "0.9.9";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "KieranWynn";
17 repo = "pyquaternion";
18 rev = "v${version}";
19 hash = "sha256-L0wT9DFUDRcmmN7OpmIDNvtQWQrM7iFnZt6R2xrJ+3A=";
20 };
21
22 # The VERSION.txt file is required for setup.py
23 # See: https://github.com/KieranWynn/pyquaternion/blob/master/setup.py#L14-L15
24 postPatch = ''
25 echo "${version}" > VERSION.txt
26 '';
27
28 build-system = [ setuptools ];
29
30 dependencies = [ numpy ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pytestFlagsArray = [ "pyquaternion/test/" ];
35
36 pythonImportsCheck = [ "pyquaternion" ];
37
38 meta = with lib; {
39 description = "Library for representing and using quaternions";
40 homepage = "http://kieranwynn.github.io/pyquaternion/";
41 license = licenses.mit;
42 maintainers = with maintainers; [ lucasew ];
43 };
44}