source: spec/trunk/SPECS/python-pycurl.spec@ 1010

Last change on this file since 1010 was 781, checked in by Yuri Dario, 9 years ago

spec: rpm, python-pycurl, yum-metadata-parser, rebuild for ucs4, ticket#182.

File size: 2.9 KB
Line 
1%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
2
3Name: python-pycurl
4Version: 7.19.5.1
5Release: 2%{?dist}
6Summary: A Python interface to libcurl
7
8Group: Development/Languages
9License: LGPLv2+ or MIT
10URL: http://pycurl.sourceforge.net/
11Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz
12Patch0: pycurl-os2.patch
13
14#Requires: keyutils-libs
15BuildRequires: python-devel
16#BuildRequires: python3-devel
17BuildRequires: curl-devel >= 7.19.0
18BuildRequires: openssl-devel
19#BuildRequires: python-bottle
20#BuildRequires: python-cherrypy
21#BuildRequires: python-nose
22#BuildRequires: python3-bottle
23#BuildRequires: python3-cherrypy
24#BuildRequires: python3-nose
25#BuildRequires: vsftpd
26
27Requires: libcurl >= 7.37
28
29# YD because of ucs4
30Requires: python >= 2.7.6-13
31
32Provides: pycurl = %{version}-%{release}
33
34%description
35PycURL is a Python interface to libcurl. PycURL can be used to fetch
36objects identified by a URL from a Python program, similar to the
37urllib Python module. PycURL is mature, very fast, and supports a lot
38of features.
39
40%package -n python3-pycurl
41Summary: A Python interface to libcurl for Python 3
42
43%description -n python3-pycurl
44PycURL is a Python interface to libcurl. PycURL can be used to fetch
45objects identified by a URL from a Python program, similar to the
46urllib Python module. PycURL is mature, very fast, and supports a lot
47of features.
48
49%prep
50%setup0 -q -n pycurl-%{version}
51%patch0 -p0 -b .os2~
52
53# temporarily exclude failing test-cases
54rm -f tests/{pycurl_object_test,share_test}.py
55
56# fails with python3 on i686
57rm -f tests/post_test.py
58
59# copy the whole directory for the python3 build
60#cp -a . %{py3dir}
61
62%build
63export CFLAGS="$RPM_OPT_FLAGS"
64%{__python} setup.py build
65# --with-nss // YD openssl required as in curl
66#pushd %{py3dir}
67#%{__python3} setup.py build --with-nss
68#popd
69
70%check
71#export PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch}
72#make test PYTHON=%{__python}
73#pushd %{py3dir}
74#export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
75#make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v"
76#popd
77
78%install
79%{__python} setup.py install -O1 --skip-build --root %{buildroot}
80#pushd %{py3dir}
81#%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
82#popd
83rm -rf %{buildroot}%{_datadir}/doc/pycurl
84
85%files
86%{!?_licensedir:%global license %%doc}
87%license COPYING-LGPL COPYING-MIT
88%doc ChangeLog README.rst examples doc tests
89%{python_sitearch}/*
90
91#%files -n python3-pycurl
92# TODO: find the lost COPYING file
93#%{!?_licensedir:%global license %%doc}
94#%license COPYING-LGPL COPYING-MIT
95#%doc ChangeLog README.rst examples doc tests
96#%{python3_sitearch}/*
97
98%changelog
99* Thu Jun 09 2016 yd <yd@os2power.com> 7.19.5.1-2
100- rebuild for ucs4, ticket#182.
101
102* Thu Feb 05 2015 yd <yd@os2power.com> 7.19.5.1-1
103- initial build.
Note: See TracBrowser for help on using the repository browser.