/[packages]/cauldron/python-urllib3/current/SPECS/python-urllib3.spec
ViewVC logotype

Contents of /cauldron/python-urllib3/current/SPECS/python-urllib3.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 688404 - (show annotations) (download)
Tue Sep 16 20:20:21 2014 UTC (6 years, 10 months ago) by umeabot
File size: 3386 byte(s)
Mageia 5 Mass Rebuild
1 %define module urllib3
2
3 Summary: Python HTTP library with thread-safe connection pooling, file post, and more
4 Name: python-%{module}
5 Version: 1.9
6 Release: %mkrel 3
7 Source0: https://pypi.python.org/packages/source/u/%{module}/%{module}-%{version}.tar.gz
8 # make all imports of things in packages try system copies first
9 Patch0: python-urllib3-unbundle.patch
10
11 License: MIT
12 Group: Development/Python
13 Url: http://urllib3.readthedocs.org/
14 BuildArch: noarch
15 BuildRequires: pkgconfig(python)
16 BuildRequires: python-setuptools
17 Requires: rootcerts
18 Requires: python-six
19 Requires: python-backports-ssl_match_hostname
20 # For unittests
21 BuildRequires: python3-nose
22 BuildRequires: python3-mock
23 BuildRequires: python3-tornado
24 BuildRequires: python-tornado
25 BuildRequires: python-nose
26 BuildRequires: python-mock
27 BuildRequires: python-backports-ssl_match_hostname
28 BuildRequires: python-six
29
30 %description
31 There are two critical features missing from the Python standard
32 library: Connection re-using/pooling and file posting. It's not
33 terribly hard to implement these yourself, but it's much easier to use
34 a module that already did the work for you.
35
36 The Python standard libraries urllib and urllib2 have little to do
37 with each other. They were designed to be independent and standalone,
38 each solving a different scope of problems, and urllib3 follows in a
39 similar vein.
40
41 %package -n python3-%{module}
42 Summary: Python 3 HTTP library with thread-safe connection pooling, file post, and more
43 Group: Development/Python
44 BuildRequires: pkgconfig(python3)
45 BuildRequires: python3-setuptools
46 BuildRequires: python3-six
47 Requires: rootcerts
48 Requires: python3-six
49
50 %description -n python3-%{module}
51 There are two critical features missing from the Python standard
52 library: Connection re-using/pooling and file posting. It's not
53 terribly hard to implement these yourself, but it's much easier to use
54 a module that already did the work for you.
55
56 The Python standard libraries urllib and urllib2 have little to do
57 with each other. They were designed to be independent and standalone,
58 each solving a different scope of problems, and urllib3 follows in a
59 similar vein.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63 %apply_patches
64
65 cp -a . %{py3dir}
66
67 %build
68 %{__python} setup.py build
69
70 pushd %{py3dir}
71 %{__python3} setup.py build
72 popd
73
74 %install
75 %{__python} setup.py install --skip-build --root %{buildroot}
76
77 # dummyserver is part of the unittest framework
78 rm -rf %{buildroot}%{python_sitelib}/dummyserver
79 # unbundle packages
80 rm -rf %{buildroot}%{python_sitelib}/urllib3/packages/
81
82 pushd %{py3dir}
83 %{__python3} setup.py install --skip-build --root %{buildroot}
84
85 # dummyserver is part of the unittest framework
86 rm -rf %{buildroot}%{python3_sitelib}/dummyserver
87 # unbundle packages
88 rm -rf %{buildroot}%{python3_sitelib}/urllib3/packages/
89 popd
90
91 %check
92 # remove tests that need a virtualenv
93 rm -rf ./test/test_util.py
94 PYTHONPATH=%{buildroot}%{python_sitelib} nosetests
95
96 pushd %{py3dir}
97 # remove tests that need a virtualenv
98 rm -rf ./test/test_util.py
99 PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version}
100 popd
101
102 %files
103 %doc CHANGES.rst LICENSE.txt README.rst CONTRIBUTORS.txt
104 %{python_sitelib}/*
105
106 %files -n python3-%{module}
107 %doc CHANGES.rst LICENSE.txt README.rst CONTRIBUTORS.txt
108 %{python3_sitelib}/*
109
110
111

  ViewVC Help
Powered by ViewVC 1.1.28