pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / rubicon-objc / default.nix
blobf24e49364f0a827a60239e5eb1c5ec5a6fbe7b45
2   lib,
3   buildPythonPackage,
4   darwin,
5   fetchFromGitHub,
6   pythonOlder,
7   setuptools,
8   setuptools-scm,
9   unittestCheckHook,
12 buildPythonPackage rec {
13   pname = "rubicon-objc";
14   version = "0.4.9";
15   pyproject = true;
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "beeware";
21     repo = "rubicon-objc";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-jQ/q2yIXJp+X4ajcbEqxXuYtYeyZJ1xTBjSlzqLuRpg=";
24   };
26   postPatch = ''
27     substituteInPlace pyproject.toml \
28       --replace-fail "setuptools==69.5.1" "setuptools" \
29       --replace-fail "setuptools_scm==8.0.4" "setuptools_scm"
30   '';
32   build-system = [
33     setuptools
34     setuptools-scm
35   ];
37   preCheck = ''
38     make -C tests/objc
39   '';
41   nativeCheckInputs = [ unittestCheckHook ];
43   checkInputs = [ darwin.apple_sdk.frameworks.Foundation ];
45   pythonImportsCheck = [ "rubicon.objc" ];
47   __darwinAllowLocalNetworking = true;
49   meta = {
50     description = "Bridge interface between Python and Objective-C";
51     homepage = "https://github.com/beeware/rubicon-objc/";
52     changelog = "https://github.com/beeware/rubicon-objc/releases/tag/v${version}";
53     license = lib.licenses.bsd3;
54     maintainers = with lib.maintainers; [ natsukium ];
55     platforms = lib.platforms.darwin;
56   };