Changed Python2 package name to python2-dns for Fedora 24+
This commit is contained in:
		
							parent
							
								
									be10c570ad
								
							
						
					
					
						commit
						f19b39c2cd
					
				| @ -13,16 +13,28 @@ | |||||||
| %{!?python26_sitelib: %global python26_sitelib %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} | %{!?python26_sitelib: %global python26_sitelib %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
|  | # __python2 macro doesn't exist for el5 and 6 | ||||||
|  | %if 0%{?rhel} == 5 || 0%{?rhel} == 6 | ||||||
|  |   %define __python2 %{__python} | ||||||
|  |   %define python2_sitelib %{python_sitelib} | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
| %if 0%{?fedora} > 12 || 0%{?epel} > 6 | %if 0%{?fedora} > 12 || 0%{?epel} > 6 | ||||||
| %global with_python3 1 | %global with_python3 1 | ||||||
| %undefine py3dir | %undefine py3dir | ||||||
| %global py3dir %{_builddir}/dnspython/dnspython3-%{version} | %global py3dir %{_builddir}/dnspython/dnspython3-%{version} | ||||||
| %global py3unpack -a 2 | %global py3unpack -a 2 | ||||||
|  | %{!?python3_pkgversion: %global python3_pkgversion 3} | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
|  | # Rename to python2-dns after Fedora 23 | ||||||
|  | %if 0%{?fedora} > 23 | ||||||
|  |   %global with_p2subpkg 1 | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| Name:           python-dns | Name:           python-dns | ||||||
| Version:        1.12.0GIT465785f | Version:        1.12.0GIT465785f | ||||||
| Release:        3%{?dist} | Release:        4%{?dist} | ||||||
| Summary:        DNS toolkit for Python | Summary:        DNS toolkit for Python | ||||||
| 
 | 
 | ||||||
| Group:          Development/Languages | Group:          Development/Languages | ||||||
| @ -64,8 +76,11 @@ BuildRequires:  python%{python3_pkgversion}-devel | |||||||
| BuildRequires:  python%{python3_pkgversion}-crypto | BuildRequires:  python%{python3_pkgversion}-crypto | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
|  | %if ! 0%{?with_p2subpkg} | ||||||
|  | Provides:       python2-dns = %{version}-%{release} | ||||||
| # for DNSSEC support | # for DNSSEC support | ||||||
| Requires:       python-crypto | Requires:       python-crypto | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| dnspython is a DNS toolkit for Python. It supports almost all record | dnspython is a DNS toolkit for Python. It supports almost all record | ||||||
| @ -77,6 +92,26 @@ level classes perform queries for data of a given name, type, and | |||||||
| class, and return an answer set. The low level classes allow direct | class, and return an answer set. The low level classes allow direct | ||||||
| manipulation of DNS zones, messages, names, and records. | manipulation of DNS zones, messages, names, and records. | ||||||
| 
 | 
 | ||||||
|  | %if 0%{?with_p2subpkg} | ||||||
|  | %package -n python2-dns | ||||||
|  | Summary:        DNS toolkit for Python 2 | ||||||
|  | Group:          Development/Languages | ||||||
|  | %{?python_provide:%python_provide python2-dns} | ||||||
|  | 
 | ||||||
|  | # for DNSSEC support | ||||||
|  | Requires:       python2-crypto | ||||||
|  | 
 | ||||||
|  | %description -n python2-dns | ||||||
|  | dnspython is a DNS toolkit for Python. It supports almost all record | ||||||
|  | types. It can be used for queries, zone transfers, and dynamic | ||||||
|  | updates. It supports TSIG authenticated messages and EDNS0. | ||||||
|  | 
 | ||||||
|  | dnspython provides both high and low level access to DNS. The high | ||||||
|  | level classes perform queries for data of a given name, type, and | ||||||
|  | class, and return an answer set. The low level classes allow direct | ||||||
|  | manipulation of DNS zones, messages, names, and records. | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
| %if 0%{?with_python26} | %if 0%{?with_python26} | ||||||
| %package -n python26-dns | %package -n python26-dns | ||||||
| Summary:        DNS toolkit for Python 2.6 | Summary:        DNS toolkit for Python 2.6 | ||||||
| @ -100,6 +135,7 @@ manipulation of DNS zones, messages, names, and records. | |||||||
| %package     -n python%{python3_pkgversion}-dns | %package     -n python%{python3_pkgversion}-dns | ||||||
| Summary:        DNS toolkit for Python 3 | Summary:        DNS toolkit for Python 3 | ||||||
| Group:          Development/Languages | Group:          Development/Languages | ||||||
|  | %{?python_provide:%python_provide python%{python3_pkgversion}-dns} | ||||||
| 
 | 
 | ||||||
| # for DNSSEC support | # for DNSSEC support | ||||||
| Requires:       python%{python3_pkgversion}-crypto | Requires:       python%{python3_pkgversion}-crypto | ||||||
| @ -143,9 +179,9 @@ popd | |||||||
| %build | %build | ||||||
| pushd %{py2dir} | pushd %{py2dir} | ||||||
| %if 0%{?rhel} == 5 | %if 0%{?rhel} == 5 | ||||||
| %{__python} -c 'import setuptools; execfile("setup.py")' build | %{__python2} -c 'import setuptools; execfile("setup.py")' build | ||||||
| %else | %else | ||||||
| %{__python} setup.py build | %{__python2} setup.py build | ||||||
| %endif | %endif | ||||||
| popd | popd | ||||||
| 
 | 
 | ||||||
| @ -166,9 +202,9 @@ rm -rf %{buildroot} | |||||||
| 
 | 
 | ||||||
| pushd %{py2dir} | pushd %{py2dir} | ||||||
| %if 0%{?rhel} == 5 | %if 0%{?rhel} == 5 | ||||||
| %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} | %{__python2} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} | ||||||
| %else | %else | ||||||
| %{__python} setup.py install --skip-build --root %{buildroot} | %{__python2} setup.py install --skip-build --root %{buildroot} | ||||||
| %endif | %endif | ||||||
| popd | popd | ||||||
| 
 | 
 | ||||||
| @ -197,7 +233,7 @@ do | |||||||
|     if [ $py != test_resolver.py ] |     if [ $py != test_resolver.py ] | ||||||
| %endif | %endif | ||||||
|     then |     then | ||||||
|         PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} $py |         PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} $py | ||||||
|     fi |     fi | ||||||
| done | done | ||||||
| popd | popd | ||||||
| @ -237,12 +273,18 @@ popd | |||||||
| %clean | %clean | ||||||
| rm -rf %{buildroot} | rm -rf %{buildroot} | ||||||
| 
 | 
 | ||||||
|  | # For Fedora > 23 builds | ||||||
|  | %if 0%{?with_p2subpkg} | ||||||
|  | %files -n python2-dns | ||||||
|  | %else | ||||||
| %files | %files | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
| %defattr(-,root,root,-) | %defattr(-,root,root,-) | ||||||
| %doc dnspython-%{version}/{ChangeLog,LICENSE,README,examples} | %doc dnspython-%{version}/{ChangeLog,LICENSE,README,examples} | ||||||
| 
 | 
 | ||||||
| %{python_sitelib}/*egg-info | %{python2_sitelib}/*egg-info | ||||||
| %{python_sitelib}/dns | %{python2_sitelib}/dns | ||||||
| 
 | 
 | ||||||
| %if 0%{?with_python26} | %if 0%{?with_python26} | ||||||
| %files -n python26-dns | %files -n python26-dns | ||||||
| @ -263,6 +305,9 @@ rm -rf %{buildroot} | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Mon Feb 01 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.12.0GIT465785f-4 | ||||||
|  | - Changed Python2 package name to python2-dns for Fedora 24+ | ||||||
|  | 
 | ||||||
| * Fri Jan 22 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.12.0GIT465785f-3 | * Fri Jan 22 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.12.0GIT465785f-3 | ||||||
| - Using python3_pkgversion to support python34 package in el7 | - Using python3_pkgversion to support python34 package in el7 | ||||||
| - Build Python3 package for el7+ | - Build Python3 package for el7+ | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user