git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.jproperties: init at 2.1.1
commit70b114a9f94ff3d5cb1fe0afb5e8ab28ae3dff66 authorFabian Affolter <mail@fabian-affolter.ch> dateSat 11 Dec 2021, 22:37 (5 years ago) parent982ebfa
2 files changed+61
pkgs/development/python-modules/jproperties/default.nix+59 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/jproperties/default.nixnew file+59
@@ -0,0 +1,59 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+, six
6+, pytest-datadir
7+, setuptools-scm
8+}:
9+
10+buildPythonPackage 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+ sha256 = "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+ checkInputs = [
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+}
pkgs/top-level/python-packages.nix+2
@@ -4049,6 +4049,8 @@ in {
40494049 inherit (self) systemd pytest;
40504050 };
40514051
4052+ jproperties = callPackage ../development/python-modules/jproperties { };
4053+
40524054 jpylyzer = callPackage ../development/python-modules/jpylyzer { };
40534055
40544056 JPype1 = callPackage ../development/python-modules/JPype1 { };