2 # - rename to python-wscgiservice to conform pld py package naming
5 %bcond_without tests # do not perform "make test"
7 %define module WsgiService
8 Summary: WSGI framework for easy creation of REST services
9 Summary(pl.UTF-8): Narzędzie do łatwego tworzenia usług REST.
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 Source0: http://pypi.python.org/packages/source/W/%{module}/%{module}-%{version}.zip
16 # Source0-md5: 5db2ddc35b67076e13c90597e5c09736
17 URL: http://pypi.python.org/pypi/WsgiService
18 %{?with_tests:BuildRequires: python-WebOb >= 1.2}
19 %{?with_tests:BuildRequires: python-decorator}
20 %{?with_tests:BuildRequires: python-nose}
21 %{?with_tests:BuildRequires: python-mox}
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.710
24 Requires: python-decorator
25 Requires: python-modules
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The primary guiding principle is that the actual service should be as
31 easy and small to write as possible. The WsgiService framework will do
33 - Abstract away error and status code handling
34 - Make it easy to create machine readable output
35 - Easily validate input
36 - Easy deployment using good configuration file handling
38 - Create usable REST API documentation from source
39 - Content negotiation to automatically use the correct output format
40 WsgiService is not planning to be a full-featured frontend framework.
41 Use your existing framework of choice for that, e.g. Pylons.
43 %description -l pl.UTF-8
44 Główną zasadą tworzenia uługi powinna być łatwość i mała ilość kodu do
45 zapisania. WsgiService dostarcza programiście:
46 - Wersje abstrakcji dla błędów i statusu.
47 - Łatwość tworzenia wyników przeznaczonych do przetwarzania dalej.
48 - Łatwość sprawdzania poprawnośći na wejścu
49 - Łatwe uruchamianie przy dobrym użyciu plików konfiguracyjnych
51 - Tworzenie dokumentacji REST ze źródeł.
52 - Automatyczną negocjację formatu odpowidzi. WsgiService nie planuje
53 być pełnym frontendem usług REST. Należy używać istniejących do wyboru
57 %setup -q -n %{module}-%{version}
61 %{?with_tests:%{__python} setup.py test}
64 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
69 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %dir %{py_sitescriptdir}/wsgiservice
78 %{py_sitescriptdir}/wsgiservice/*.py[co]
79 %if "%{py_ver}" > "2.4"
80 %{py_sitescriptdir}/WsgiService-*.egg-info