2017-12-13 22:33:23 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, python
|
|
|
|
, unittest2, scripttest, pytz, pylint, mock
|
|
|
|
, testtools, pbr, tempita, decorator, sqlalchemy
|
|
|
|
, six, sqlparse, testrepository
|
2017-05-03 20:30:37 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "sqlalchemy-migrate";
|
2017-05-03 20:30:37 +00:00
|
|
|
version = "0.11.0";
|
|
|
|
|
2017-12-13 22:33:23 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-05-03 20:30:37 +00:00
|
|
|
sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
|
|
|
|
};
|
|
|
|
|
2017-12-13 22:33:23 +00:00
|
|
|
checkInputs = [ unittest2 scripttest pytz pylint mock testtools testrepository ];
|
2017-05-03 20:30:37 +00:00
|
|
|
propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
|
|
|
|
|
2017-12-13 22:33:23 +00:00
|
|
|
prePatch = ''
|
|
|
|
sed -i -e /tempest-lib/d \
|
|
|
|
-e /testtools/d \
|
|
|
|
test-requirements.txt
|
|
|
|
'';
|
2017-05-03 20:30:37 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
echo sqlite:///__tmp__ > test_db.cfg
|
|
|
|
# depends on ibm_db_sa
|
|
|
|
rm migrate/tests/changeset/databases/test_ibmdb2.py
|
|
|
|
# wants very old testtools
|
|
|
|
rm migrate/tests/versioning/test_schema.py
|
|
|
|
# transient failures on py27
|
|
|
|
substituteInPlace migrate/tests/versioning/test_util.py --replace "test_load_model" "noop"
|
|
|
|
${python.interpreter} setup.py test
|
|
|
|
'';
|
|
|
|
|
2017-09-20 14:12:46 +00:00
|
|
|
doCheck = true;
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2017-05-03 20:30:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://code.google.com/p/sqlalchemy-migrate/;
|
|
|
|
description = "Schema migration tools for SQLAlchemy";
|
|
|
|
license = licenses.asl20;
|
2017-09-23 13:08:28 +00:00
|
|
|
maintainers = with maintainers; [ makefu ];
|
2017-05-03 20:30:37 +00:00
|
|
|
};
|
|
|
|
}
|