diff options
| author | Fabian Affolter <fabian@affolter-engineering.ch> | 2024-05-12 17:44:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-12 17:44:46 +0200 |
| commit | f008d8bc18ebe2bcd33b658d22e92ef38156edd3 (patch) | |
| tree | 7ec46acd5431959c598c605f2fb3e69054a49e13 | |
| parent | Merge pull request #311031 from fabaff/hikvision-refactor (diff) | |
| parent | python312Packages.hjson: format with nixfmt (diff) | |
| download | nixpkgs-f008d8bc18ebe2bcd33b658d22e92ef38156edd3.tar.gz | |
Merge pull request #311028 from fabaff/hjson-refactor
python312Packages.hjson: refactor
| -rw-r--r-- | pkgs/development/python-modules/hjson/default.nix | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/hjson/default.nix b/pkgs/development/python-modules/hjson/default.nix index 44aa789f0d04..46ae9f518a34 100644 --- a/pkgs/development/python-modules/hjson/default.nix +++ b/pkgs/development/python-modules/hjson/default.nix @@ -1,25 +1,34 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, python -, makeWrapper +{ + lib, + buildPythonPackage, + fetchFromGitHub, + makeWrapper, + pytestCheckHook, + python, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "hjson"; version = "3.0.2"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.5"; - # N.B. pypi src tarball does not have tests src = fetchFromGitHub { owner = "hjson"; repo = "hjson-py"; - rev = "v${version}"; - sha256 = "1jc7j790rcqnhbrfj4lhnz3f6768dc55aij840wmx16jylfqpc2n"; + rev = "refs/tags/v${version}"; + hash = "sha256-VrCLHfXShF45IEhGVQpryBzjxreQEunyghazDNKRh8k="; }; + build-system = [ setuptools ]; + nativeBuildInputs = [ makeWrapper ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "hjson" ]; postInstall = '' @@ -29,11 +38,17 @@ buildPythonPackage rec { --prefix PATH : ${lib.makeBinPath [ python ]} ''; + disabledTestPaths = [ + # AttributeError: b'/build/source/hjson/tool.py:14: Deprecati[151 chars]ools' != b'' + "hjson/tests/test_tool.py" + ]; + meta = with lib; { description = "A user interface for JSON"; - mainProgram = "hjson"; homepage = "https://github.com/hjson/hjson-py"; + changelog = "https://github.com/hjson/hjson-py/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ bhipple ]; + mainProgram = "hjson"; }; } |
