nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 zope-event,
7 zope-interface,
8 unittestCheckHook,
9 zope-i18nmessageid,
10}:
11
12buildPythonPackage rec {
13 pname = "zope-schema";
14 version = "8.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "zopefoundation";
19 repo = "zope.schema";
20 tag = version;
21 hash = "sha256-pO3yL0gej2PGD01ySiPJPU66P/9hW73T2n/ZnUPa3C0=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace-fail "setuptools ==" "setuptools >="
27 '';
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 zope-event
33 zope-interface
34 ];
35
36 pythonImportsCheck = [ "zope.schema" ];
37
38 nativeCheckInputs = [
39 unittestCheckHook
40 zope-i18nmessageid
41 ];
42
43 unittestFlagsArray = [ "src/zope/schema/tests" ];
44
45 pythonNamespaces = [ "zope" ];
46
47 meta = {
48 homepage = "https://github.com/zopefoundation/zope.schema";
49 description = "zope.interface extension for defining data schemas";
50 changelog = "https://github.com/zopefoundation/zope.schema/blob/${src.tag}/CHANGES.rst";
51 license = lib.licenses.zpl21;
52 maintainers = [ ];
53 };
54}