Start compiling for python3
Thanks Ganapathi Kamath
This commit is contained in:
parent
91463be0b2
commit
53e8334b04
49
pyodbc.spec
49
pyodbc.spec
@ -1,8 +1,12 @@
|
||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%{!?python3_sitearch: %define python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%global modulename pyodbc
|
||||
%bcond_without python3 1
|
||||
|
||||
Name: pyodbc
|
||||
Version: 3.0.7
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Python DB API 2.0 Module for ODBC
|
||||
Group: Development/Languages
|
||||
License: MIT
|
||||
@ -13,30 +17,73 @@ Requires: unixODBC, python >= 2.4
|
||||
BuildRequires: unixODBC-devel
|
||||
BuildRequires: python-devel
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
A Python DB API 2 and 3 module for ODBC. This project provides an up-to-date,
|
||||
convenient interface to ODBC using native data types like datetime and
|
||||
decimal.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{modulename}
|
||||
Summary: Python DB API 2.0 Module for ODBC
|
||||
Group: Development/Languages
|
||||
Requires: python3 >= 3.4
|
||||
|
||||
%description -n python3-%{modulename}
|
||||
A Python DB API 2 and 3 module for ODBC. This project provides an up-to-date,
|
||||
convenient interface to ODBC using native data types like datetime and
|
||||
decimal.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt README.rst
|
||||
%{python_sitearch}/*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{name}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt README.rst
|
||||
%{python3_sitearch}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Feb 17 2015 Honza Horak <hhorak@redhat.com> - 3.0.7-2
|
||||
- Start compiling for python3
|
||||
Thanks Ganapathi Kamath
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.7-1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user