1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, six 6, pytest-datadir 7, setuptools-scm 8}: 9 10buildPythonPackage rec { 11 pname = "jproperties"; 12 version = "2.1.1"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "Tblue"; 17 repo = "python-jproperties"; 18 rev = "v${version}"; 19 hash = "sha256-O+ALeGHMNjW1dc9IRyLzO81k8DW2vbGjuZqXxgrhYjo="; 20 }; 21 22 SETUPTOOLS_SCM_PRETEND_VERSION = version; 23 24 nativeBuildInputs = [ 25 setuptools-scm 26 ]; 27 28 propagatedBuildInputs = [ 29 six 30 ]; 31 32 nativeCheckInputs = [ 33 pytest-datadir 34 pytestCheckHook 35 ]; 36 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 ''; 43 44 disabledTestPaths = [ 45 # TypeError: 'PosixPath' object... 46 "tests/test_simple_utf8.py" 47 ]; 48 49 pythonImportsCheck = [ 50 "jproperties" 51 ]; 52 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 }; 59}