1 { lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, python
2 , scripttest, pytz, pbr, tempita, decorator, sqlalchemy
3 , six, sqlparse, testrepository
6 buildPythonPackage rec {
7 pname = "sqlalchemy-migrate";
11 inherit pname version;
12 sha256 = "1y0lcqii7b4vp7yh9dyxrl4i77hi8jkkw7d06mgdw2h458ljxh0b";
15 # See: https://review.openstack.org/#/c/608382/
18 url = "https://github.com/openstack/sqlalchemy-migrate/pull/18.patch";
19 sha256 = "1qyfq2m7w7xqf0r9bc2x42qcra4r9k9l9g1jy5j0fvlb6bvvjj07";
24 substituteInPlace test-requirements.txt \
25 --replace "ibm_db_sa>=0.3.0;python_version<'3.0'" "" \
26 --replace "ibm-db-sa-py3;python_version>='3.0'" "" \
27 --replace "tempest-lib>=0.1.0" "" \
28 --replace "testtools>=0.9.34,<0.9.36" "" \
32 checkInputs = [ scripttest pytz testrepository ];
33 propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
35 doCheck = !stdenv.isDarwin;
38 export PATH=$PATH:$out/bin
39 echo sqlite:///__tmp__ > test_db.cfg
40 # depends on ibm_db_sa
41 rm migrate/tests/changeset/databases/test_ibmdb2.py
42 # wants very old testtools
43 rm migrate/tests/versioning/test_schema.py
44 # transient failures on py27
45 substituteInPlace migrate/tests/versioning/test_util.py --replace "test_load_model" "noop"
46 ${python.interpreter} setup.py test
50 homepage = "https://opendev.org/x/sqlalchemy-migrate";
51 description = "Schema migration tools for SQLAlchemy";
52 license = licenses.asl20;
53 maintainers = teams.openstack.members ++ (with maintainers; [ makefu ]);