Merge pull request #25460 from lsix/fix-pythonpackages-update-errors

Fix buildbot
This commit is contained in:
Frederik Rietdijk 2017-05-04 12:39:39 +02:00 committed by GitHub
commit bad72e972d
7 changed files with 112 additions and 69 deletions

View File

@ -1,21 +1,26 @@
{ stdenv, buildPythonPackage, fetchurl, isPy3k, { stdenv, buildPythonPackage, fetchurl, isPy3k, isPy33,
unittest2, mock, pytest, trollius, pytest-asyncio, unittest2, mock, pytest, trollius, asyncio,
six, twisted, txaio pytest-asyncio, futures,
six, twisted, txaio, zope_interface
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "autobahn"; pname = "autobahn";
version = "0.18.2"; version = "17.5.1";
src = fetchurl { src = fetchurl {
url = "mirror://pypi/a/${pname}/${name}.tar.gz"; url = "mirror://pypi/a/${pname}/${name}.tar.gz";
sha256 = "1alp71plqnrak5nm2vn9mmkxayjb081c1kihqwf60wdpvv0w7y14"; sha256 = "0p2xx20g0rj6pnp4h3231mn8zk4ag8msv69f93gai2hzl5vglcia";
}; };
buildInputs = [ unittest2 mock pytest trollius pytest-asyncio ]; # Upstream claim python2 support, but tests require pytest-asyncio which
propagatedBuildInputs = [ six twisted txaio ]; # is pythn3 only. Therefore, tests are skipped for python2.
doCheck = isPy3k;
buildInputs = stdenv.lib.optionals isPy3k [ unittest2 mock pytest pytest-asyncio ];
propagatedBuildInputs = [ six twisted zope_interface txaio ] ++
(stdenv.lib.optional isPy33 asyncio) ++
(stdenv.lib.optionals (!isPy3k) [ trollius futures ]);
disabled = !isPy3k;
checkPhase = '' checkPhase = ''
py.test $out py.test $out
''; '';

View File

@ -0,0 +1,32 @@
{ stdenv, buildPythonPackage, fetchurl, python,
pbr, Babel, testrepository, subunit, testtools,
coverage, oslosphinx, oslotest, testscenarios, six, ddt
}:
buildPythonPackage rec {
name = "os-testr-${version}";
version = "0.8.1";
src = fetchurl {
url = "mirror://pypi/o/os-testr/${name}.tar.gz";
sha256 = "10ws7l5p25psnp6rwymwdzh4zagmmnbf56xwg06cn2292m95l4i7";
};
patchPhase = ''
sed -i 's@python@${python.interpreter}@' .testr.conf
sed -i 's@python@${python.interpreter}@' os_testr/tests/files/testr-conf
'';
checkPhase = ''
export PATH=$PATH:$out/bin
${python.interpreter} setup.py test
'';
propagatedBuildInputs = [ pbr Babel testrepository subunit testtools ];
buildInputs = [ coverage oslosphinx oslotest testscenarios six ddt ];
meta = with stdenv.lib; {
description = "A testr wrapper to provide functionality for OpenStack projects";
homepage = http://docs.openstack.org/developer/os-testr/;
license = licenses.asl20;
};
}

View File

@ -1,9 +1,11 @@
{ stdenv, buildPythonPackage, fetchurl, pytest }: { stdenv, buildPythonPackage, fetchurl, pytest, isPy3k }:
buildPythonPackage rec { buildPythonPackage rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "pytest-asyncio"; pname = "pytest-asyncio";
version = "0.5.0"; version = "0.5.0";
disabled = !isPy3k;
src = fetchurl { src = fetchurl {
url = "mirror://pypi/p/${pname}/${name}.tar.gz"; url = "mirror://pypi/p/${pname}/${name}.tar.gz";
sha256 = "03sxq8fglr4lw4y6wqlbli9ypr65fxzx6hlpn5wpccx8v5472iff"; sha256 = "03sxq8fglr4lw4y6wqlbli9ypr65fxzx6hlpn5wpccx8v5472iff";

View File

@ -0,0 +1,34 @@
{ stdenv, buildPythonPackage, fetchurl, python,
unittest2, scripttest, pytz, pylint, tempest-lib, mock, testtools,
pbr, tempita, decorator, sqlalchemy, six, sqlparse
}:
buildPythonPackage rec {
name = "sqlalchemy-migrate-${version}";
version = "0.11.0";
src = fetchurl {
url = "mirror://pypi/s/sqlalchemy-migrate/${name}.tar.gz";
sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
};
buildInputs = [ unittest2 scripttest pytz pylint tempest-lib mock testtools ];
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
'';
meta = with stdenv.lib; {
homepage = http://code.google.com/p/sqlalchemy-migrate/;
description = "Schema migration tools for SQLAlchemy";
license = licenses.asl20;
};
}

View File

@ -13,11 +13,11 @@ let
package = pythonPackages.buildPythonApplication (rec { package = pythonPackages.buildPythonApplication (rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "buildbot"; pname = "buildbot";
version = "0.9.5"; version = "0.9.6";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "11r553nmh87a9pm58wycimapk2pw9hnlc7hffn97xwbqprd8qh66"; sha256 = "0d6ys1wjwsv4jg4bja1cqhy279hhrl1c9kwyx126srf45slcvg1w";
}; };
buildInputs = with pythonPackages; [ buildInputs = with pythonPackages; [
@ -69,6 +69,12 @@ let
]; ];
patches = [
# This patch disables the test that tries to reat /etc/os-release which
# is not accessible in sandboxed builds.
./skip_test_linux_distro.patch
];
postPatch = '' postPatch = ''
substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)" substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
@ -79,6 +85,10 @@ let
rm -fv buildbot/test/unit/test_interpolate_secrets.py rm -fv buildbot/test/unit/test_interpolate_secrets.py
rm -fv buildbot/test/unit/test_secret_in_file.py rm -fv buildbot/test/unit/test_secret_in_file.py
rm -fv buildbot/test/unit/test_secret_in_vault.py rm -fv buildbot/test/unit/test_secret_in_vault.py
# Remove this line after next update. See
# https://github.com/buildbot/buildbot/commit/e7fc8c8eba903c2aa6d7e6393499e5b9bffc2334
rm -fv buildbot/test/unit/test_mq_wamp.py
''; '';
passthru = { inherit withPlugins; }; passthru = { inherit withPlugins; };

View File

@ -0,0 +1,11 @@
diff -Nur buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py
--- buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-04-19 16:57:02.000000000 +0200
+++ buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-05-04 12:22:54.575762551 +0200
@@ -147,6 +147,7 @@
_sendBuildbotNetUsageData({'foo': 'bar'})
def test_linux_distro(self):
+ raise SkipTest("NixOS sandboxed builds hides /etc/os-release")
system = platform.system()
if system != "Linux":
raise SkipTest("test is only for linux")

View File

@ -16647,33 +16647,7 @@ in {
}; };
os-testr = buildPythonPackage rec { os-testr = callPackage ../development/python-modules/os-testr { };
name = "os-testr-${version}";
version = "0.4.2";
src = pkgs.fetchurl {
url = "mirror://pypi/o/os-testr/${name}.tar.gz";
sha256 = "0474z0mxb7y3vfk4s097wf1mzji5d135vh27cvlh9q17rq3x9r3w";
};
patchPhase = ''
sed -i 's@python@${python.interpreter}@' .testr.conf
sed -i 's@python@${python.interpreter}@' os_testr/tests/files/testr-conf
'';
checkPhase = ''
export PATH=$PATH:$out/bin
${python.interpreter} setup.py test
'';
propagatedBuildInputs = with self; [ pbr Babel testrepository subunit testtools ];
buildInputs = with self; [ coverage oslosphinx oslotest testscenarios six ddt ];
# Requires pbr < 2
# Or update to latest version but that requires updating the whole of openstack / oslo
meta.broken = true;
};
bandit = buildPythonPackage rec { bandit = buildPythonPackage rec {
name = "bandit-${version}"; name = "bandit-${version}";
@ -17007,6 +16981,8 @@ in {
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://launchpad.net/python-cliff"; homepage = "https://launchpad.net/python-cliff";
# requires an update, incompatible with current dependencies (pbr)
broken = true;
}; };
}; };
@ -17100,6 +17076,9 @@ in {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Python bindings to the OpenStack Images API"; description = "Python bindings to the OpenStack Images API";
homepage = "http://www.openstack.org/"; homepage = "http://www.openstack.org/";
# requires an update, incompatible with current dependencies (pbr)
broken = true;
}; };
}; };
@ -24756,37 +24735,7 @@ in {
}; };
}; };
sqlalchemy_migrate = callPackage ../development/python-modules/sqlalchemy-migrate { };
sqlalchemy_migrate_func = sqlalchemy: buildPythonPackage rec {
name = "sqlalchemy-migrate-0.10.0";
src = pkgs.fetchurl {
url = "mirror://pypi/s/sqlalchemy-migrate/${name}.tar.gz";
sha256 = "00z0lzjs4ksr9yr31zs26csyacjvavhpz6r74xaw1r89kk75qg7q";
};
buildInputs = with self; [ unittest2 scripttest pytz pylint tempest-lib mock testtools ];
propagatedBuildInputs = with self; [ 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
'';
meta = {
homepage = http://code.google.com/p/sqlalchemy-migrate/;
description = "Schema migration tools for SQLAlchemy";
};
};
sqlalchemy_migrate = self.sqlalchemy_migrate_func self.sqlalchemy;
sqlparse = buildPythonPackage rec { sqlparse = buildPythonPackage rec {
name = "sqlparse-${version}"; name = "sqlparse-${version}";