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