1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 msgpack,
6 oslo-utils,
7 oslotest,
8 pbr,
9 pytz,
10 setuptools,
11 stestr,
12}:
13
14buildPythonPackage rec {
15 pname = "oslo-serialization";
16 version = "5.5.0";
17 pyproject = true;
18
19 src = fetchPypi {
20 pname = "oslo.serialization";
21 inherit version;
22 hash = "sha256-nnUvxdipdZVnKN2WqCGGeDs/78rLs1U6zZMwWIYeFaY=";
23 };
24
25 postPatch = ''
26 # only a small portion of the listed packages are actually needed for running the tests
27 # so instead of removing them one by one remove everything
28 rm test-requirements.txt
29 '';
30
31 build-system = [
32 pbr
33 setuptools
34 ];
35
36 dependencies = [
37 msgpack
38 oslo-utils
39 pytz
40 ];
41
42 nativeCheckInputs = [
43 oslotest
44 stestr
45 ];
46
47 checkPhase = ''
48 runHook preCheck
49 stestr run
50 runHook postCheck
51 '';
52
53 pythonImportsCheck = [ "oslo_serialization" ];
54
55 meta = with lib; {
56 description = "Oslo Serialization library";
57 homepage = "https://github.com/openstack/oslo.serialization";
58 license = licenses.asl20;
59 maintainers = teams.openstack.members;
60 };
61}