1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 zope-component, 7 zope-i18nmessageid, 8 zope-interface, 9 zope-location, 10 zope-proxy, 11 zope-schema, 12 pytz, 13 zope-configuration, 14 btrees, 15 unittestCheckHook, 16 zope-exceptions, 17 zope-testing, 18}: 19 20buildPythonPackage rec { 21 pname = "zope-security"; 22 version = "7.3"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "zopefoundation"; 27 repo = "zope.security"; 28 tag = version; 29 hash = "sha256-p+9pCcBsCJY/V6vraVZHMr5VwYHFe217AbRVoSnDphs="; 30 }; 31 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail "setuptools<74" "setuptools" 35 ''; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 zope-component 41 zope-i18nmessageid 42 zope-interface 43 zope-location 44 zope-proxy 45 zope-schema 46 ]; 47 48 optional-dependencies = { 49 pytz = [ pytz ]; 50 # untrustedpython = [ zope-untrustedpython ]; 51 zcml = [ zope-configuration ]; 52 }; 53 54 pythonImportsCheck = [ "zope.security" ]; 55 56 nativeCheckInputs = [ 57 btrees 58 unittestCheckHook 59 zope-exceptions 60 zope-testing 61 ] 62 ++ lib.flatten (lib.attrValues optional-dependencies); 63 64 # Import process is too complex and some tests fail 65 preCheck = '' 66 rm -r src/zope/security/tests/test_metaconfigure.py 67 rm -r src/zope/security/tests/test_proxy.py 68 rm -r src/zope/security/tests/test_zcml_functest.py 69 ''; 70 71 unittestFlagsArray = [ "src/zope/security/tests" ]; 72 73 pythonNamespaces = [ "zope" ]; 74 75 meta = { 76 description = "Zope Security Framework"; 77 homepage = "https://github.com/zopefoundation/zope.security"; 78 changelog = "https://github.com/zopefoundation/zope.security/blob/${src.tag}/CHANGES.rst"; 79 license = lib.licenses.zpl21; 80 maintainers = with lib.maintainers; [ ]; 81 }; 82}