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

Last change on this file since 522 was 522, checked in by Yuri Dario, 11 years ago

spec: python-pycurl, initial build.

File size: 2.8 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: 1%{?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
29Provides: pycurl = %{version}-%{release}
30
31%description
32PycURL is a Python interface to libcurl. PycURL can be used to fetch
33objects identified by a URL from a Python program, similar to the
34urllib Python module. PycURL is mature, very fast, and supports a lot
35of features.
36
37%package -n python3-pycurl
38Summary: A Python interface to libcurl for Python 3
39
40%description -n python3-pycurl
41PycURL is a Python interface to libcurl. PycURL can be used to fetch
42objects identified by a URL from a Python program, similar to the
43urllib Python module. PycURL is mature, very fast, and supports a lot
44of features.
45
46%prep
47%setup0 -q -n pycurl-%{version}
48%patch0 -p0 -b .os2~
49
50# temporarily exclude failing test-cases
51rm -f tests/{pycurl_object_test,share_test}.py
52
53# fails with python3 on i686
54rm -f tests/post_test.py
55
56# copy the whole directory for the python3 build
57#cp -a . %{py3dir}
58
59%build
60export CFLAGS="$RPM_OPT_FLAGS"
61%{__python} setup.py build
62# --with-nss // YD openssl required as in curl
63#pushd %{py3dir}
64#%{__python3} setup.py build --with-nss
65#popd
66
67%check
68#export PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch}
69#make test PYTHON=%{__python}
70#pushd %{py3dir}
71#export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
72#make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v"
73#popd
74
75%install
76%{__python} setup.py install -O1 --skip-build --root %{buildroot}
77#pushd %{py3dir}
78#%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
79#popd
80rm -rf %{buildroot}%{_datadir}/doc/pycurl
81
82%files
83%{!?_licensedir:%global license %%doc}
84%license COPYING-LGPL COPYING-MIT
85%doc ChangeLog README.rst examples doc tests
86%{python_sitearch}/*
87
88#%files -n python3-pycurl
89# TODO: find the lost COPYING file
90#%{!?_licensedir:%global license %%doc}
91#%license COPYING-LGPL COPYING-MIT
92#%doc ChangeLog README.rst examples doc tests
93#%{python3_sitearch}/*
94
95%changelog
96* Thu Feb 05 2015 yd <yd@os2power.com> 7.19.5.1-1
97- initial build.
Note: See TracBrowser for help on using the repository browser.