1{ stdenv, buildPythonPackage, fetchPypi, python
2, unittest2, scripttest, pytz, pylint, mock
3, testtools, pbr, tempita, decorator, sqlalchemy
4, six, sqlparse, testrepository
5}:
6buildPythonPackage rec {
7 pname = "sqlalchemy-migrate";
8 version = "0.11.0";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
13 };
14
15 checkInputs = [ unittest2 scripttest pytz pylint mock testtools testrepository ];
16 propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
17
18 prePatch = ''
19 sed -i -e /tempest-lib/d \
20 -e /testtools/d \
21 test-requirements.txt
22 '';
23 checkPhase = ''
24 export PATH=$PATH:$out/bin
25 echo sqlite:///__tmp__ > test_db.cfg
26 # depends on ibm_db_sa
27 rm migrate/tests/changeset/databases/test_ibmdb2.py
28 # wants very old testtools
29 rm migrate/tests/versioning/test_schema.py
30 # transient failures on py27
31 substituteInPlace migrate/tests/versioning/test_util.py --replace "test_load_model" "noop"
32 ${python.interpreter} setup.py test
33 '';
34
35 doCheck = true;
36
37 meta = with stdenv.lib; {
38 homepage = http://code.google.com/p/sqlalchemy-migrate/;
39 description = "Schema migration tools for SQLAlchemy";
40 license = licenses.asl20;
41 maintainers = with maintainers; [ makefu ];
42 };
43}