nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 zope-event,
7 zope-hookable,
8 zope-interface,
9 persistent,
10 zope-configuration,
11 zope-i18nmessageid,
12 zope-location,
13 zope-proxy,
14 zope-security,
15 unittestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "zope-component";
20 version = "7.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "zopefoundation";
25 repo = "zope.component";
26 tag = version;
27 hash = "sha256-3Hl2sm2M0we+fpdt4GSjAStLSAJ1c4Za1vfm9Bj8z8s=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace-fail "setuptools ==" "setuptools >="
33 '';
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 zope-event
39 zope-hookable
40 zope-interface
41 ];
42
43 optional-dependencies = {
44 hook = [ ];
45 persistentregistry = [ persistent ];
46 security = [
47 zope-location
48 zope-proxy
49 zope-security
50 ];
51 zcml = [
52 zope-configuration
53 zope-i18nmessageid
54 ];
55 };
56
57 pythonImportsCheck = [ "zope.component" ];
58
59 nativeCheckInputs = [
60 unittestCheckHook
61 zope-configuration
62 ];
63
64 unittestFlagsArray = [ "src/zope/component/tests" ];
65
66 # AssertionError: 'test_interface.IFoo' != 'zope.component.tests.test_interface.IFoo'
67 preCheck = ''
68 rm src/zope/component/tests/test_interface.py
69 '';
70
71 pythonNamespaces = [ "zope" ];
72
73 meta = {
74 homepage = "https://github.com/zopefoundation/zope.component";
75 description = "Zope Component Architecture";
76 changelog = "https://github.com/zopefoundation/zope.component/blob/${version}/CHANGES.rst";
77 license = lib.licenses.zpl21;
78 maintainers = [ ];
79 };
80}