cleanup
This commit is contained in:
parent
d2fc28e129
commit
923dc65483
@ -1,15 +1,3 @@
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%{!?_licensedir: %global license %%doc}
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 5
|
||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%endif
|
||||
|
||||
%global distname PySocks
|
||||
%global flatname pysocks
|
||||
%global sum A Python SOCKS client module
|
||||
@ -24,11 +12,6 @@ URL: https://github.com/Anorov/PySocks
|
||||
Source0: https://files.pythonhosted.org/packages/source/P/PySocks/PySocks-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
@ -44,6 +27,7 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
|
||||
%package -n python2-%{flatname}
|
||||
Summary: %{sum}
|
||||
BuildRequires: python2-devel
|
||||
%{?python_provide:%python_provide python2-%{flatname}}
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1334407
|
||||
@ -52,6 +36,7 @@ Obsoletes: python2-SocksiPy
|
||||
Provides: python-SocksiPy
|
||||
Provides: python2-SocksiPy
|
||||
|
||||
|
||||
%description -n python2-%{flatname}
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
|
||||
@ -64,15 +49,16 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
- urllib2 handler included.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python%{python3_pkgversion}-%{flatname}
|
||||
Summary: %{sum}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{flatname}}
|
||||
|
||||
# This package doesn't actually exist... but if it did, we would conflict with
|
||||
# it.
|
||||
Conflicts: python%{python3_pkgversion}-SocksiPy
|
||||
|
||||
|
||||
%description -n python%{python3_pkgversion}-%{flatname}
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
|
||||
@ -83,7 +69,6 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
- HTTP proxy client included but not supported or recommended (you should use
|
||||
urllib2's or requests' own HTTP proxy interface)
|
||||
- urllib2 handler included.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@ -91,15 +76,13 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
|
||||
#%%check
|
||||
## No tests included in the tarball...
|
||||
@ -109,6 +92,7 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
#%%{__python3} setup.py test
|
||||
#%%endif
|
||||
|
||||
|
||||
%files -n python2-%{flatname}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
@ -116,7 +100,6 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
%{python2_sitelib}/sockshandler.py*
|
||||
%{python2_sitelib}/%{distname}-%{version}*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python%{python3_pkgversion}-%{flatname}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
@ -124,7 +107,6 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
||||
%{python3_sitelib}/sockshandler.py*
|
||||
%{python3_sitelib}/__pycache__/*socks*
|
||||
%{python3_sitelib}/%{distname}-%{version}-*
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user