1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, mako
6, python-dateutil
7, sqlalchemy
8, importlib-metadata
9, importlib-resources
10, pytest-xdist
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "alembic";
16 version = "1.12.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-jnZFwy5PIAZ15p8HRUFTNetZo2Y/X+tIer+gswxFiIs=";
24 };
25
26 propagatedBuildInputs = [
27 mako
28 python-dateutil
29 sqlalchemy
30 ] ++ lib.optionals (pythonOlder "3.9") [
31 importlib-resources
32 ] ++ lib.optionals (pythonOlder "3.8") [
33 importlib-metadata
34 ];
35
36 pythonImportsCheck = [
37 "alembic"
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 pytest-xdist
43 ];
44
45 meta = with lib; {
46 homepage = "https://bitbucket.org/zzzeek/alembic";
47 description = "A database migration tool for SQLAlchemy";
48 license = licenses.mit;
49 maintainers = with maintainers; [ ];
50 };
51}