1 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
---|
2 |
|
---|
3 | Name: python-pycurl
|
---|
4 | Version: 7.19.5.1
|
---|
5 | Release: 2%{?dist}
|
---|
6 | Summary: A Python interface to libcurl
|
---|
7 |
|
---|
8 | Group: Development/Languages
|
---|
9 | License: LGPLv2+ or MIT
|
---|
10 | URL: http://pycurl.sourceforge.net/
|
---|
11 | Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz
|
---|
12 | Patch0: pycurl-os2.patch
|
---|
13 |
|
---|
14 | #Requires: keyutils-libs
|
---|
15 | BuildRequires: python-devel
|
---|
16 | #BuildRequires: python3-devel
|
---|
17 | BuildRequires: curl-devel >= 7.19.0
|
---|
18 | BuildRequires: 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 |
|
---|
27 | Requires: libcurl >= 7.37
|
---|
28 |
|
---|
29 | # YD because of ucs4
|
---|
30 | Requires: python >= 2.7.6-13
|
---|
31 |
|
---|
32 | Provides: pycurl = %{version}-%{release}
|
---|
33 |
|
---|
34 | %description
|
---|
35 | PycURL is a Python interface to libcurl. PycURL can be used to fetch
|
---|
36 | objects identified by a URL from a Python program, similar to the
|
---|
37 | urllib Python module. PycURL is mature, very fast, and supports a lot
|
---|
38 | of features.
|
---|
39 |
|
---|
40 | %package -n python3-pycurl
|
---|
41 | Summary: A Python interface to libcurl for Python 3
|
---|
42 |
|
---|
43 | %description -n python3-pycurl
|
---|
44 | PycURL is a Python interface to libcurl. PycURL can be used to fetch
|
---|
45 | objects identified by a URL from a Python program, similar to the
|
---|
46 | urllib Python module. PycURL is mature, very fast, and supports a lot
|
---|
47 | of features.
|
---|
48 |
|
---|
49 | %prep
|
---|
50 | %setup0 -q -n pycurl-%{version}
|
---|
51 | %patch0 -p0 -b .os2~
|
---|
52 |
|
---|
53 | # temporarily exclude failing test-cases
|
---|
54 | rm -f tests/{pycurl_object_test,share_test}.py
|
---|
55 |
|
---|
56 | # fails with python3 on i686
|
---|
57 | rm -f tests/post_test.py
|
---|
58 |
|
---|
59 | # copy the whole directory for the python3 build
|
---|
60 | #cp -a . %{py3dir}
|
---|
61 |
|
---|
62 | %build
|
---|
63 | export 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
|
---|
83 | rm -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.
|
---|