about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
blob: 258f84e8c72a6f11a69a1d1341a68a63a0438b45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, buildPythonPackage, fetchurl, python,
  unittest2, scripttest, pytz, pylint, tempest-lib, mock, testtools,
  pbr, tempita, decorator, sqlalchemy, six, sqlparse 
}:
buildPythonPackage rec {
  pname = "sqlalchemy-migrate";
  name = "${pname}-${version}";
  version = "0.11.0";

  src = fetchurl {
    url = "mirror://pypi/s/sqlalchemy-migrate/${name}.tar.gz";
    sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
  };

  checkInputs = [ unittest2 scripttest pytz pylint mock testtools tempest-lib ];
  propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];

  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
  '';

  doCheck = true;

  meta = with stdenv.lib; {
    homepage = http://code.google.com/p/sqlalchemy-migrate/;
    description = "Schema migration tools for SQLAlchemy";
    license = licenses.asl20;
    maintainers = with maintainers; [ makefu ];
  };
}