1 | %{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")} |
---|
2 | %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} |
---|
3 | %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")} |
---|
4 | |
---|
5 | %global python3_pkgversion 3 |
---|
6 | |
---|
7 | %global sqlite_version 3.8.8.2 |
---|
8 | %global uprel 1 |
---|
9 | %global pkg_version %{sqlite_version}-r%{uprel} |
---|
10 | |
---|
11 | %global real_version %(eval echo %{pkg_version} | %{__sed} 's/-/./') |
---|
12 | |
---|
13 | #filter_provides_in %{python_sitearch}/.*\.so$ |
---|
14 | #filter_provides_in %{python3_sitearch}/.*\.so$ |
---|
15 | #filter_setup |
---|
16 | |
---|
17 | %global __requires_exclude_from (%{python_sitearch}|%{python3_sitearch})/.*\.so$ |
---|
18 | |
---|
19 | Name: python-apsw |
---|
20 | Version: %{real_version} |
---|
21 | Release: 1%{?_dist_release} |
---|
22 | Summary: Another Python SQLite Wrapper |
---|
23 | Group: Development/Libraries |
---|
24 | License: zlib |
---|
25 | URL: https://github.com/rogerbinns/apsw |
---|
26 | Source: https://github.com/rogerbinns/apsw/releases/download/%{pkg_version}/apsw-%{pkg_version}.tar.gz |
---|
27 | |
---|
28 | Provides: python2-apsw |
---|
29 | |
---|
30 | BuildRequires: python-devel |
---|
31 | BuildRequires: python%{python3_pkgversion}-devel |
---|
32 | BuildRequires: sqlite3-devel |
---|
33 | |
---|
34 | Requires: sqlite3 |
---|
35 | |
---|
36 | %description |
---|
37 | APSW is a Python wrapper for the SQLite embedded relational database |
---|
38 | engine. In contrast to other wrappers such as pysqlite it focuses on |
---|
39 | being a minimal layer over SQLite attempting just to translate the |
---|
40 | complete SQLite API into Python. |
---|
41 | |
---|
42 | %package -n python%{python3_pkgversion}-apsw |
---|
43 | Summary: Another Python SQLite Wrapper |
---|
44 | %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} |
---|
45 | |
---|
46 | %description -n python%{python3_pkgversion}-apsw |
---|
47 | APSW is a Python %{python3_version} wrapper for the SQLite embedded relational database |
---|
48 | engine. In contrast to other wrappers such as pysqlite it focuses on |
---|
49 | being a minimal layer over SQLite attempting just to translate the |
---|
50 | complete SQLite API into Python. |
---|
51 | |
---|
52 | %prep |
---|
53 | %autosetup -n apsw-%{pkg_version} |
---|
54 | rm -f doc/.buildinfo |
---|
55 | |
---|
56 | %build |
---|
57 | CFLAGS="%{optflags}" %{__python} setup.py build |
---|
58 | CFLAGS="%{optflags}" python3 setup.py build |
---|
59 | |
---|
60 | %install |
---|
61 | CFLAGS="%{optflags}" %{__python} setup.py install \ |
---|
62 | --skip-build --root %{buildroot} |
---|
63 | CFLAGS="%{optflags}" python3 setup.py install \ |
---|
64 | --skip-build --root %{buildroot} |
---|
65 | |
---|
66 | %check |
---|
67 | : |
---|
68 | |
---|
69 | %files |
---|
70 | %doc doc/* |
---|
71 | %{python_sitearch}/apsw*.so |
---|
72 | %{python_sitearch}/apsw*.egg-info |
---|
73 | |
---|
74 | %files -n python%{python3_pkgversion}-apsw |
---|
75 | %doc doc/* |
---|
76 | %{python3_sitearch}/apsw*.so |
---|
77 | %{python3_sitearch}/apsw*.egg-info |
---|
78 | |
---|
79 | |
---|
80 | %changelog |
---|
81 | * Mon Jul 11 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.8.8.2.r1-4 |
---|
82 | - initial build for Vine Linux. |
---|