1{ lib, buildPythonPackage, fetchPypi, isPy3k
2, pbr, six, simplegeneric, netaddr, pytz, webob
3, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx
4, flask, flask-restful, suds-jurko, glibcLocales }:
5
6buildPythonPackage rec {
7 pname = "WSME";
8 version = "0.9.3";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "e24fcff24392a0b176e560ffc6591b1f658342bbc992f84e0e8a3c53fd92580a";
13 };
14
15 postPatch = ''
16 # remove turbogears tests as we don't have it packaged
17 rm tests/test_tg*
18 # WSME seems incompatible with recent SQLAlchemy version
19 rm wsmeext/tests/test_sqlalchemy*
20 # https://bugs.launchpad.net/wsme/+bug/1510823
21 ${if isPy3k then "rm tests/test_cornice.py" else ""}
22 '';
23
24 checkPhae = ''
25 nosetests --exclude test_buildhtml \
26 --exlcude test_custom_clientside_error \
27 --exclude test_custom_non_http_clientside_error
28 '';
29
30 # UnicodeEncodeError, ImportError, ...
31 doCheck = !isPy3k;
32
33 nativeBuildInputs = [ pbr ];
34
35 propagatedBuildInputs = [
36 six simplegeneric netaddr pytz webob
37 ];
38
39 checkInputs = [
40 cornice nose webtest pecan transaction cherrypy sphinx
41 flask flask-restful suds-jurko glibcLocales
42 ];
43
44 meta = with lib; {
45 description = "Simplify the writing of REST APIs, and extend them with additional protocols";
46 homepage = http://git.openstack.org/cgit/openstack/wsme;
47 license = licenses.mit;
48 };
49}