212 lines
7.1 KiB
RPMSpec
212 lines
7.1 KiB
RPMSpec
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
%global modulename pyodbc
|
|
%if 0%{?fedora}
|
|
%bcond_without python3 1
|
|
%else
|
|
%bcond_with python3 1
|
|
%endif
|
|
|
|
Name: pyodbc
|
|
Version: 3.0.10
|
|
Release: 11%{?dist}
|
|
Summary: Python DB API 2.0 Module for ODBC
|
|
Group: Development/Languages
|
|
License: MIT
|
|
URL: https://github.com/mkleehammer/pyodbc
|
|
Source0: https://github.com/mkleehammer/pyodbc/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
BuildRequires: unixODBC-devel
|
|
BuildRequires: python-devel
|
|
|
|
%if 0%{?with_python3}
|
|
BuildRequires: python3-devel
|
|
%endif
|
|
|
|
%global _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.
|
|
|
|
%description %_description
|
|
|
|
%package -n python2-%{modulename}
|
|
Summary: %summary
|
|
Requires: unixODBC, python >= 2.4
|
|
%{?python_provide:%python_provide python2-%{modulename}}
|
|
# Remove before F30
|
|
Provides: pyodbc = %{version}-%{release}
|
|
Provides: pyodbc%{?_isa} = %{version}-%{release}
|
|
Obsoletes: pyodbc < %{version}-%{release}
|
|
|
|
%description -n python2-%{modulename} %_description
|
|
|
|
%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 -qc
|
|
mv %{name}-%{version} python2
|
|
%if 0%{?with_python3}
|
|
cp -a python2 python3
|
|
%endif
|
|
|
|
%build
|
|
pushd python2
|
|
%{__python2} setup.py build
|
|
popd
|
|
%if 0%{?with_python3}
|
|
pushd python3
|
|
%{__python3} setup.py build
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
pushd python2
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
popd
|
|
%if 0%{?with_python3}
|
|
pushd python3
|
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
|
popd
|
|
%endif
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
|
|
%files -n python2-%{modulename}
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license python2/LICENSE.txt
|
|
%doc python2/README.md python2/notes.txt
|
|
%{python2_sitearch}/*
|
|
|
|
%if 0%{?with_python3}
|
|
%files -n python3-%{name}
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license python3/LICENSE.txt
|
|
%doc python3/README.md python3/notes.txt
|
|
%{python3_sitearch}/*
|
|
%endif
|
|
|
|
%changelog
|
|
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0.10-11
|
|
- Add Provides for the old name without %%_isa
|
|
|
|
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.0.10-10
|
|
- Python 2 binary package renamed to python2-pyodbc
|
|
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
|
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.10-9
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.10-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.10-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.0.10-6
|
|
- Rebuild for Python 3.6
|
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.10-5
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.10-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.10-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.10-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Tue May 12 2015 Orion Poplawski <orion@cora.wnra.com> - 3.0.10-1
|
|
- Update to 3.0.10
|
|
|
|
* Tue May 12 2015 Orion Poplawski <orion@cora.wnra.com> - 3.0.7-4
|
|
- Cleanup and update spec
|
|
|
|
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.0.7-3
|
|
- Rebuilt for GCC 5 C++11 ABI change
|
|
|
|
* 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
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.6-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.6-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.6-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Mon Aug 13 2012 Honza Horak <hhorak@redhat.com> - 3.0.6-1
|
|
- Upstream released 3.0.6
|
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-6
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.1.5-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.5-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Wed Apr 22 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.5-2
|
|
- EVR bump
|
|
|
|
* Wed Apr 22 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.5-1
|
|
- Upstream released 2.1.5
|
|
|
|
* Mon Feb 23 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-5
|
|
- Removing versioned BuildRequires
|
|
|
|
* Mon Feb 23 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-4
|
|
- Changes for plague
|
|
|
|
* Sun Feb 22 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-3
|
|
- Removed extraneous Requires
|
|
|
|
* Sun Feb 22 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-2
|
|
- Added README.rst file from git repo
|
|
|
|
* Wed Jan 07 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-1
|
|
- Upstream released 2.1.4
|
|
|
|
* Wed Dec 03 2008 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.1-1
|
|
- New upstream version and homepage
|
|
|
|
* Mon Jun 02 2008 Ray Van Dolson <rayvd@fedoraproject.org> - 2.0.58-3
|
|
- Removed silly python BuildRequires
|
|
|
|
* Mon Jun 02 2008 Ray Van Dolson <rayvd@fedoraproject.org> - 2.0.58-2
|
|
- Added python and python-devel to BuildRequires
|
|
|
|
* Fri May 30 2008 Ray Van Dolson <rayvd@fedoraproject.org> - 2.0.58-1
|
|
- Initial package
|