ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / jproperties / default.nix
blob0089e153f4f370d690e341e754a45ae4526064ec
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , six
6 , pytest-datadir
7 , setuptools-scm
8 }:
10 buildPythonPackage rec {
11   pname = "jproperties";
12   version = "2.1.1";
13   format = "setuptools";
15   src = fetchFromGitHub {
16     owner = "Tblue";
17     repo = "python-jproperties";
18     rev = "v${version}";
19     sha256 = "sha256-O+ALeGHMNjW1dc9IRyLzO81k8DW2vbGjuZqXxgrhYjo=";
20   };
22   SETUPTOOLS_SCM_PRETEND_VERSION = version;
24   nativeBuildInputs = [
25     setuptools-scm
26   ];
28   propagatedBuildInputs = [
29     six
30   ];
32   checkInputs = [
33     pytest-datadir
34     pytestCheckHook
35   ];
37   postPatch = ''
38     substituteInPlace setup.py \
39       --replace "setuptools_scm ~= 3.3" "setuptools_scm"
40     substituteInPlace pytest.ini \
41       --replace "--cov=jproperties --cov-report=term --cov-report=html --cov-branch" ""
42   '';
44   disabledTestPaths = [
45     # TypeError: 'PosixPath' object...
46     "tests/test_simple_utf8.py"
47   ];
49   pythonImportsCheck = [
50     "jproperties"
51   ];
53   meta = with lib; {
54     description = "Java Property file parser and writer for Python";
55     homepage = "https://github.com/Tblue/python-jproperties";
56     license = with licenses; [ bsd3 ];
57     maintainers = with maintainers; [ fab ];
58   };