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 distname PySocks
|
||||||
%global flatname pysocks
|
%global flatname pysocks
|
||||||
%global sum A Python SOCKS client module
|
%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
|
Source0: https://files.pythonhosted.org/packages/source/P/PySocks/PySocks-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A fork of SocksiPy with bug fixes and extra features.
|
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}
|
%package -n python2-%{flatname}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
BuildRequires: python2-devel
|
||||||
%{?python_provide:%python_provide python2-%{flatname}}
|
%{?python_provide:%python_provide python2-%{flatname}}
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1334407
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1334407
|
||||||
@ -52,6 +36,7 @@ Obsoletes: python2-SocksiPy
|
|||||||
Provides: python-SocksiPy
|
Provides: python-SocksiPy
|
||||||
Provides: python2-SocksiPy
|
Provides: python2-SocksiPy
|
||||||
|
|
||||||
|
|
||||||
%description -n python2-%{flatname}
|
%description -n python2-%{flatname}
|
||||||
A fork of SocksiPy with bug fixes and extra features.
|
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.
|
- urllib2 handler included.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python%{python3_pkgversion}-%{flatname}
|
%package -n python%{python3_pkgversion}-%{flatname}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{flatname}}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{flatname}}
|
||||||
|
|
||||||
# This package doesn't actually exist... but if it did, we would conflict with
|
# This package doesn't actually exist... but if it did, we would conflict with
|
||||||
# it.
|
# it.
|
||||||
Conflicts: python%{python3_pkgversion}-SocksiPy
|
Conflicts: python%{python3_pkgversion}-SocksiPy
|
||||||
|
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{flatname}
|
%description -n python%{python3_pkgversion}-%{flatname}
|
||||||
A fork of SocksiPy with bug fixes and extra features.
|
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
|
- HTTP proxy client included but not supported or recommended (you should use
|
||||||
urllib2's or requests' own HTTP proxy interface)
|
urllib2's or requests' own HTTP proxy interface)
|
||||||
- urllib2 handler included.
|
- urllib2 handler included.
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -91,15 +76,13 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%py2_install
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
|
||||||
|
|
||||||
#%%check
|
#%%check
|
||||||
## No tests included in the tarball...
|
## 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
|
#%%{__python3} setup.py test
|
||||||
#%%endif
|
#%%endif
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-%{flatname}
|
%files -n python2-%{flatname}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -116,7 +100,6 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
|||||||
%{python2_sitelib}/sockshandler.py*
|
%{python2_sitelib}/sockshandler.py*
|
||||||
%{python2_sitelib}/%{distname}-%{version}*
|
%{python2_sitelib}/%{distname}-%{version}*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python%{python3_pkgversion}-%{flatname}
|
%files -n python%{python3_pkgversion}-%{flatname}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -124,7 +107,6 @@ Acts as a drop-in replacement to the socket module. Featuring:
|
|||||||
%{python3_sitelib}/sockshandler.py*
|
%{python3_sitelib}/sockshandler.py*
|
||||||
%{python3_sitelib}/__pycache__/*socks*
|
%{python3_sitelib}/__pycache__/*socks*
|
||||||
%{python3_sitelib}/%{distname}-%{version}-*
|
%{python3_sitelib}/%{distname}-%{version}-*
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user