]> git.pld-linux.org Git - packages/python-pysendfile.git/blame - python-pysendfile.spec
rebuild with tests and docs
[packages/python-pysendfile.git] / python-pysendfile.spec
CommitLineData
0a6337dc
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Python 2 interface to sendfile(2)
8Summary(pl.UTF-8): Interfejs Pythona 2 do wywołania sendfile(2)
9Name: python-pysendfile
10Version: 2.0.1
d66e4c8a 11Release: 8
0a6337dc
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.python.org/simple/pysendfile/
15Source0: https://pypi.python.org/packages/source/p/pysendfile/pysendfile-%{version}.tar.gz
16# Source0-md5: e7b301eddd703ab74a48c59a8fda1f97
17URL: https://github.com/giampaolo/pysendfile
18%if %{with python2}
19BuildRequires: python-devel >= 1:2.5
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-devel >= 1:3.2
24BuildRequires: python3-setuptools
25%endif
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.714
28Requires: python-libs >= 1:2.5
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Python 2 interface to sendfile(2).
33
34sendfile(2) is a system call which provides a "zero-copy" way of
35copying data from one file descriptor to another (a socket). The
36phrase "zero-copy" refers to the fact that all of the copying of data
37between the two descriptors is done entirely by the kernel, with no
38copying of data into userspace buffers. This is particularly useful
39when sending a file over a socket (e.g. FTP).
40
41%description -l pl.UTF-8
42Interfejs Pythona 2 do wywołania sendfile(2)
43
44sendfile(2) to wywołanie systemowe zapewniające kopiowanie "bez
45kopiowania" z jednego deskryptora pliku do innego (gniazda).
46Sformułowanie "bez kopiowania" oznacza tu, że całe kopiowanie danych
47między deskryptorami jest wykonywane całkowicie w jądrze, bez
48kopiowania danych do buforów w przestrzeni użytkownika. Jest to
49przydatne szczególnie przy wysyłaniu pliku po gnieździe (np. FTP).
50
51%package -n python3-pysendfile
52Summary: Python 3 interface to sendfile(2)
53Summary(pl.UTF-8): Interfejs Pythona 3 do wywołania sendfile(2)
54Group: Libraries/Python
55Requires: python3-libs >= 1:3.2
56
57%description -n python3-pysendfile
58Python 3 interface to sendfile(2).
59
60sendfile(2) is a system call which provides a "zero-copy" way of
61copying data from one file descriptor to another (a socket). The
62phrase "zero-copy" refers to the fact that all of the copying of data
63between the two descriptors is done entirely by the kernel, with no
64copying of data into userspace buffers. This is particularly useful
65when sending a file over a socket (e.g. FTP).
66
67%description -n python3-pysendfile -l pl.UTF-8
68Interfejs Pythona 3 do wywołania sendfile(2)
69
70sendfile(2) to wywołanie systemowe zapewniające kopiowanie "bez
71kopiowania" z jednego deskryptora pliku do innego (gniazda).
72Sformułowanie "bez kopiowania" oznacza tu, że całe kopiowanie danych
73między deskryptorami jest wykonywane całkowicie w jądrze, bez
74kopiowania danych do buforów w przestrzeni użytkownika. Jest to
75przydatne szczególnie przy wysyłaniu pliku po gnieździe (np. FTP).
76
77%prep
78%setup -q -n pysendfile-%{version}
79
80%build
81%if %{with python2}
82%py_build
83
84%if %{with tests}
85PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
86%{__python} test/test_sendfile.py
87%endif
88%endif
89
90%if %{with python3}
91%py3_build
92
93%if %{with tests}
94PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
95%{__python3} test/test_sendfile.py
96%endif
97%endif
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%py_install
104%endif
105
106%if %{with python3}
107%py3_install
108%endif
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%if %{with python2}
114%files
115%defattr(644,root,root,755)
116%doc HISTORY.rst LICENSE README.rst
117%attr(755,root,root) %{py_sitedir}/sendfile.so
118%{py_sitedir}/pysendfile-%{version}-py*.egg-info
119%endif
120
121%if %{with python3}
122%files -n python3-pysendfile
123%defattr(644,root,root,755)
124%doc HISTORY.rst LICENSE README.rst
125%attr(755,root,root) %{py3_sitedir}/sendfile.cpython-*.so
126%{py3_sitedir}/pysendfile-%{version}-py*.egg-info
127%endif
This page took 0.094223 seconds and 4 git commands to generate.