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