python3Packages.django-cryptography: 1.1 -> 1.1-unstable-2024-02-16

Upstream author has apparently vanished, so this is probably it until a
fork appears.
This commit is contained in:
Martin Weinelt
2025-12-05 14:15:33 +01:00
parent 08276b73ca
commit 5c5a120b4e
2 changed files with 26 additions and 35 deletions
@@ -5,45 +5,52 @@
django-appconf,
fetchFromGitHub,
lib,
python,
pythonOlder,
pytestCheckHook,
pytest-django,
setuptools,
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "django-cryptography";
version = "1.1";
disabled = pythonOlder "3.7";
format = "pyproject";
version = "1.1-unstable-2024-02-16";
pyproject = true;
src = fetchFromGitHub {
owner = "georgemarshall";
repo = "django-cryptography";
tag = version;
hash = "sha256-C3E2iT9JdLvF+1g+xhZ8dPDjjh25JUxLAtTMnalIxPk=";
rev = "a5cde9beed707a14a2ef2f1f7f1fee172feb8b5e";
hash = "sha256-Xj/fw8EapsYvVbZPRQ81yeE9QpIQ1TIuk+ASOCGh/Uc=";
};
nativeBuildInputs = [ setuptools ];
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "packages = django_cryptography" "packages = find:"
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cryptography
django
django-appconf
];
patches = [
# See: https://github.com/georgemarshall/django-cryptography/pull/88
./fix-setup-cfg.patch
];
pythonImportsCheck = [ "django_cryptography" ];
checkPhase = ''
runHook preCheck
${python.interpreter} ./runtests.py
runHook postCheck
nativeCheckInputs = [
pytest-django
pytestCheckHook
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
'';
disabledTests = [
# self.assertEqual(len(errors), 1) - AssertionError: 0 != 1
"test_field_checks"
];
meta = with lib; {
homepage = "https://github.com/georgemarshall/django-cryptography";
description = "Set of primitives for performing cryptography in Django";
@@ -1,16 +0,0 @@
diff --git a/setup.cfg b/setup.cfg
index 865b4c3..577d917 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -35,7 +35,10 @@ project_urls =
Documentation = https://django-cryptography.readthedocs.io
[options]
-packages = django_cryptography
+packages =
+ django_cryptography
+ django_cryptography.core
+ django_cryptography.utils
python_requires = >=3.6
include_package_data = True
install_requires =