%define __python /opt/freeware/bin/python
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}


Name:           pysqlite
Version:        2.8.3
Release:        2 
Summary:        A DB API v2.0 compatible interface to SQLite 3.0 

Group:          Development/Languages/Python
License:        BSD
URL:            http://pkgs.fedoraproject.org
Source0:        http://pkgs.fedoraproject.org/repo/pkgs/python-sqlite/pysqlite-1.1.7.tar.gz/edbed4ccfdc114754c73081e79163be1/pysqlite-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python  >= 2.7.16
BuildRequires:  sqlite >= 3.27.1, sqlite-devel >= 3.27.1 
Requires:	sqlite >= 3.27.1
Requires:	python >= 2.7.16

#Provides:       pycurl = %{version}-%{release}

%description
This is an extension module for the SQLite embedded relational database. It
tries to conform to the Python DB-API Spec v2 as far as possible. One problem
is that SQLite returns everything as text. This is a result of SQLite's
internal representation of data, however it still may be possible to return
data in the type specified by the table definitions. I am still working on
that, and will require some study of the SQLite source.

%prep
%setup0 -q -n pysqlite-%{version}
#chmod a-x examples/*


%build
%{__python} setup.py build

%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

 
%clean
#rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE 
%{python_sitearch}/*

%changelog
* Fri Sep 27 2019 Harshita Jain <harjain9@in.ibm.com > -2.8.3-1
- Rebuild  changing buildrequires ans requires 

* Tue Jun 12 2018 Harshita Jain <harjain9@in.ibm.com> -2.8.3-1
- Update to latest version - 2.8.3

* Fri Feb 17 2017 Ravi Hirekurabar <rhirekur@in.ibm.com> - 1.1.7-2
- Rebuilt changing Build require and require field to sqlite >= 3.7.15.2

* Mon Jun 13 2016 Sangamesh Mallayy <smallayy@in.ibm.com> 0.4-1
- Rebuild with requires on sqlite & python.
