]>
Commit | Line | Data |
---|---|---|
29d1582f ER |
1 | # TODO |
2 | # - rename to python-wscgiservice to conform pld py package naming | |
3e4ba575 | 3 | # |
79d802a5 | 4 | # Conditional build: |
3e4ba575 | 5 | %bcond_without tests # do not perform "make test" |
79d802a5 | 6 | |
ea17dbaf | 7 | %define module WsgiService |
e602710f MK |
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} | |
3e4ba575 | 11 | Version: 0.3.1 |
483ef3aa | 12 | Release: 5 |
e602710f MK |
13 | License: BSD |
14 | Group: Development/Languages/Python | |
e602710f | 15 | Source0: http://pypi.python.org/packages/source/W/%{module}/%{module}-%{version}.zip |
3e4ba575 | 16 | # Source0-md5: 5db2ddc35b67076e13c90597e5c09736 |
e602710f | 17 | URL: http://pypi.python.org/pypi/WsgiService |
3e4ba575 ER |
18 | %{?with_tests:BuildRequires: python-WebOb >= 1.2} |
19 | %{?with_tests:BuildRequires: python-decorator} | |
20 | %{?with_tests:BuildRequires: python-nose} | |
ea17dbaf | 21 | %{?with_tests:BuildRequires: python-mox} |
e602710f | 22 | BuildRequires: rpm-pythonprov |
f26f1bbd | 23 | BuildRequires: rpmbuild(macros) >= 1.710 |
e602710f MK |
24 | Requires: python-decorator |
25 | Requires: python-modules | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
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 | |
32 | for the developer: | |
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 | |
37 | - Make testing easy | |
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. | |
42 | ||
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 | |
50 | - Łatwe testowanie | |
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 | |
54 | np Pylons. | |
55 | ||
e602710f MK |
56 | %prep |
57 | %setup -q -n %{module}-%{version} | |
58 | ||
59 | %build | |
b692bded | 60 | %py_build |
79d802a5 | 61 | %{?with_tests:%{__python} setup.py test} |
e602710f MK |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
b692bded | 65 | %py_install |
e602710f MK |
66 | |
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} | |
70 | %py_postclean | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
3e4ba575 ER |
77 | %dir %{py_sitescriptdir}/wsgiservice |
78 | %{py_sitescriptdir}/wsgiservice/*.py[co] | |
e602710f MK |
79 | %if "%{py_ver}" > "2.4" |
80 | %{py_sitescriptdir}/WsgiService-*.egg-info | |
81 | %endif |