python310Packages.sqlalchemy-migrate: fix build by removing unittest2, adopt into openstack team, minor cleanups
This commit is contained in:
parent
a282e47548
commit
98ba056822
1 changed files with 20 additions and 14 deletions
|
@ -1,8 +1,8 @@
|
|||
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, python
|
||||
, unittest2, scripttest, pytz, mock
|
||||
, testtools, pbr, tempita, decorator, sqlalchemy
|
||||
, scripttest, pytz, pbr, tempita, decorator, sqlalchemy
|
||||
, six, sqlparse, testrepository
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sqlalchemy-migrate";
|
||||
version = "0.13.0";
|
||||
|
@ -13,21 +13,27 @@ buildPythonPackage rec {
|
|||
};
|
||||
|
||||
# See: https://review.openstack.org/#/c/608382/
|
||||
patches = [ (fetchpatch {
|
||||
url = "https://github.com/openstack/sqlalchemy-migrate/pull/18.patch";
|
||||
sha256 = "1qyfq2m7w7xqf0r9bc2x42qcra4r9k9l9g1jy5j0fvlb6bvvjj07";
|
||||
}) ];
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/openstack/sqlalchemy-migrate/pull/18.patch";
|
||||
sha256 = "1qyfq2m7w7xqf0r9bc2x42qcra4r9k9l9g1jy5j0fvlb6bvvjj07";
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ unittest2 scripttest pytz mock testtools testrepository ];
|
||||
postPatch = ''
|
||||
substituteInPlace test-requirements.txt \
|
||||
--replace "ibm_db_sa>=0.3.0;python_version<'3.0'" "" \
|
||||
--replace "ibm-db-sa-py3;python_version>='3.0'" "" \
|
||||
--replace "tempest-lib>=0.1.0" "" \
|
||||
--replace "testtools>=0.9.34,<0.9.36" "" \
|
||||
--replace "pylint" ""
|
||||
'';
|
||||
|
||||
checkInputs = [ scripttest pytz testrepository ];
|
||||
propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e /tempest-lib/d \
|
||||
-e /testtools/d \
|
||||
test-requirements.txt
|
||||
'';
|
||||
checkPhase = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
echo sqlite:///__tmp__ > test_db.cfg
|
||||
|
@ -41,9 +47,9 @@ buildPythonPackage rec {
|
|||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/openstack/sqlalchemy-migrate";
|
||||
homepage = "https://opendev.org/x/sqlalchemy-migrate";
|
||||
description = "Schema migration tools for SQLAlchemy";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ makefu ];
|
||||
maintainers = teams.openstack.members ++ (with maintainers; [ makefu ]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue