]> git.pld-linux.org Git - packages/python-apsw.git/blob - python-apsw.spec
rebuild with tests and docs
[packages/python-apsw.git] / python-apsw.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  apsw
8 %define         sqlite_ver 3.8.5
9
10 Summary:        Another Python SQLite Wrapper
11 Summary(pl.UTF-8):      Another Python SQLite Wrapper - jeszcze jeden pythonowy wrapper dla SQLite
12 Name:           python-%{module}
13 Version:        3.8.5
14 Release:        17
15 License:        Free
16 Group:          Libraries/Python
17 Source0:        https://github.com/rogerbinns/apsw/archive/%{version}-r1.tar.gz
18 # Source0-md5:  09eb9f39d7cf9d320ee8e89f9e9ab7ea
19 URL:            http://rogerbinns.github.io/apsw/
20 BuildRequires:  rpmbuild(macros) >= 1.710
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  sqlite3-devel >= %{sqlite_ver}
23 BuildRequires:  unzip
24 %if %{with python2}
25 BuildRequires:  python-devel
26 BuildRequires:  python-distribute
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel
30 BuildRequires:  python3-modules
31 %endif
32 Requires:       python-modules
33 Requires:       sqlite3 >= %{sqlite_ver}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 APSW provides an SQLite 3 wrapper that provides the thinnest layer
38 over SQLite 3 possible. Everything you can do from the C API to SQLite
39 3, you can do from Python. Although APSW looks vaguely similar to the
40 DBAPI, it is not compliant with that API and instead works the way
41 SQLite 3 does.
42
43 %description -l pl.UTF-8
44 APSW udostępnia wrapper SQLite 3 dostarczający najcieńszą jak to tylko
45 możliwe warstwę ponad SQLite 3. Wszystko co można zrobić z poziomu API
46 C SQLite 3 można zrobić także z poziomu Pythona. Chociaż APSQ wygląda
47 dosyć podobnie do DBAPI, nie jest kompatybilne z tym API, natomiast
48 działa tak, jak SQLite 3.
49
50 %package -n python3-%{module}
51 Summary:        -
52 Summary(pl.UTF-8):      -
53 Group:          Libraries/Python
54 Requires:       sqlite3 >= %{sqlite_ver}
55
56 %description -n python3-%{module}
57 APSW provides an SQLite 3 wrapper that provides the thinnest layer
58 over SQLite 3 possible. Everything you can do from the C API to SQLite
59 3, you can do from Python. Although APSW looks vaguely similar to the
60 DBAPI, it is not compliant with that API and instead works the way
61 SQLite 3 does.
62
63 %description -n python3-%{module} -l pl.UTF-8
64 APSW udostępnia wrapper SQLite 3 dostarczający najcieńszą jak to tylko
65 możliwe warstwę ponad SQLite 3. Wszystko co można zrobić z poziomu API
66 C SQLite 3 można zrobić także z poziomu Pythona. Chociaż APSQ wygląda
67 dosyć podobnie do DBAPI, nie jest kompatybilne z tym API, natomiast
68 działa tak, jak SQLite 3.
69
70 %package apidocs
71 Summary:        %{module} API documentation
72 Summary(pl.UTF-8):      Dokumentacja API %{module}
73 Group:          Documentation
74
75 %description apidocs
76 API documentation for %{module}.
77
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API %{module}.
80
81 %prep
82 %setup -q -n %{module}-%{version}-r1
83
84 %build
85 %if %{with python2}
86 %py_build %{?with_tests:test}
87 %endif
88
89 %if %{with python3}
90 %py3_build %{?with_tests:test}
91 %endif
92
93 %if %{with doc}
94 cd docs
95 %{__make} -j1 html
96 rm -rf _build/html/_sources
97 %endif
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %py_install
104
105 %py_postclean
106 %endif
107
108 %if %{with python3}
109 %py3_install
110 %endif
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %files
117 %defattr(644,root,root,755)
118 %doc LICENSE README.rst
119 %attr(755,root,root) %{py_sitedir}/*.so
120 %if "%{py_ver}" > "2.4"
121 %{py_sitedir}/%{module}-*.egg-info
122 %endif
123 %endif
124
125 %if %{with python3}
126 %files -n python3-%{module}
127 %defattr(644,root,root,755)
128 %doc LICENSE README.rst
129 %{py3_sitedir}/%{module}*.so
130 %{py3_sitedir}/%{module}-%{version}*-py*.egg-info
131 %endif
132
133 %if %{with doc}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/*
137 %endif
This page took 0.076188 seconds and 3 git commands to generate.