1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 django,
11
12 # tests
13 pytest-django,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "django-mysql";
19 version = "4.13.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "adamchainz";
24 repo = "django-mysql";
25 rev = "refs/tags/${version}";
26 hash = "sha256-hIvkLLv9R23u+JC6t/zwbMvmgLMstYp0ytuSqNiohJg=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [ django ];
32
33 doCheck = false; # requires mysql/mariadb server
34
35 env.DJANGO_SETTINGS_MODULE = "tests.settings";
36
37 nativeCheckInputs = [
38 pytest-django
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [ "django_mysql" ];
43
44 meta = with lib; {
45 changelog = "https://github.com/adamchainz/django-mysql/blob/${version}/docs/changelog.rst";
46 description = "Extensions to Django for use with MySQL/MariaD";
47 homepage = "https://github.com/adamchainz/django-mysql";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}