python-apsw-vl.spec 2.7 KB

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