nixpkgs/pkgs/development/python-modules/WSME/default.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

2018-03-20 14:40:43 +00:00
{ lib, buildPythonPackage, fetchPypi, isPy3k
, pbr, six, simplegeneric, netaddr, pytz, webob
2018-03-20 15:13:38 +00:00
, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx
, flask, flask-restful, suds-jurko, glibcLocales }:
2018-03-20 14:40:43 +00:00
buildPythonPackage rec {
pname = "WSME";
2020-06-06 07:46:56 +01:00
version = "0.10.0";
2018-03-20 14:40:43 +00:00
src = fetchPypi {
inherit pname version;
2020-06-06 07:46:56 +01:00
sha256 = "965b9ce48161e5c50d84aedcf50dca698f05bf07e9d489201bccaec3141cd304";
2018-03-20 14:40:43 +00:00
};
2018-03-20 15:13:38 +00:00
postPatch = ''
2018-03-20 14:40:43 +00:00
# remove turbogears tests as we don't have it packaged
rm tests/test_tg*
2018-03-20 15:13:38 +00:00
# WSME seems incompatible with recent SQLAlchemy version
rm wsmeext/tests/test_sqlalchemy*
2018-03-20 14:40:43 +00:00
# https://bugs.launchpad.net/wsme/+bug/1510823
${if isPy3k then "rm tests/test_cornice.py" else ""}
2018-03-20 15:13:38 +00:00
'';
2018-03-20 14:40:43 +00:00
2018-03-20 15:13:38 +00:00
checkPhae = ''
nosetests --exclude test_buildhtml \
--exlcude test_custom_clientside_error \
--exclude test_custom_non_http_clientside_error
2018-03-20 14:40:43 +00:00
'';
2018-03-20 15:13:38 +00:00
# UnicodeEncodeError, ImportError, ...
doCheck = !isPy3k;
2018-03-20 14:40:43 +00:00
nativeBuildInputs = [ pbr ];
propagatedBuildInputs = [
six simplegeneric netaddr pytz webob
];
checkInputs = [
cornice nose webtest pecan transaction cherrypy sphinx
2018-03-20 15:13:38 +00:00
flask flask-restful suds-jurko glibcLocales
2018-03-20 14:40:43 +00:00
];
meta = with lib; {
description = "Simplify the writing of REST APIs, and extend them with additional protocols";
homepage = "http://git.openstack.org/cgit/openstack/wsme";
2018-03-20 14:40:43 +00:00
license = licenses.mit;
};
}