Subpackage python2-pyodbc has been removed, FTBFS fixed
This commit is contained in:
parent
8316f5f4c0
commit
68e6107bf1
76
pyodbc.spec
76
pyodbc.spec
@ -1,29 +1,16 @@
|
||||
%{!?__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: 15%{?dist}
|
||||
Release: 16%{?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
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: unixODBC-devel
|
||||
BuildRequires: python2-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,\
|
||||
@ -32,74 +19,35 @@ decimal.
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python2-%{modulename}
|
||||
Summary: %summary
|
||||
Requires: unixODBC, python2 >= 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
|
||||
%{?python_provide:%python_provide python3-%{modulename}}
|
||||
|
||||
%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
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
pushd python2
|
||||
%{__python2} setup.py build
|
||||
popd
|
||||
%if 0%{?with_python3}
|
||||
pushd python3
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
%py3_build
|
||||
|
||||
%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
|
||||
%py3_install
|
||||
|
||||
|
||||
%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
|
||||
%license LICENSE.txt
|
||||
%doc README.md notes.txt
|
||||
%{python3_sitearch}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.10-16
|
||||
- Subpackage python2-pyodbc has been removed
|
||||
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.10-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user