]> git.pld-linux.org Git - packages/python-pyftpdlib.git/blame - python-pyftpdlib.spec
- fix shebangs
[packages/python-pyftpdlib.git] / python-pyftpdlib.spec
CommitLineData
c43f343a
JB
1#
2# Conditional build:
fe447987 3%bcond_with tests # unit tests (can fail under heavy system load)
c43f343a
JB
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Very fast asynchronous FTP server library for Python 2
8Summary(pl.UTF-8): Bardzo szybka biblioteka asynchronicznego serwera FTP dla Pythona 2
9Name: python-pyftpdlib
30b16124 10Version: 1.5.5
7636eeac 11Release: 3
c43f343a
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.python.org/simple/pyftpdlib/
15Source0: https://files.pythonhosted.org/packages/source/p/pyftpdlib/pyftpdlib-%{version}.tar.gz
30b16124
JB
16# Source0-md5: 7f8089520d60171bee5dab2b721e8d00
17Patch0: %{name}-tests.patch
18Patch1: %{name}-sendfile.patch
c43f343a
JB
19URL: https://github.com/giampaolo/pyftpdlib/
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.6
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-pyOpenSSL
25BuildRequires: python-pysendfile >= 1.5
26%endif
27%endif
28%if %{with python3}
30b16124 29BuildRequires: python3-modules >= 1:3.4
c43f343a
JB
30BuildRequires: python3-setuptools
31%if %{with tests}
32BuildRequires: python3-pyOpenSSL
c43f343a
JB
33%endif
34%endif
35BuildRequires: rpm-pythonprov
36BuildRequires: rpmbuild(macros) >= 1.714
37Requires: python-modules >= 1:2.6
38Suggests: python-pyOpenSSL
39Suggests: python-pysendfile >= 1.5
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Python FTP server library provides a high-level portable interface to
45easily write very efficient, scalable and asynchronous FTP servers
46with Python. It is the most complete RFC-959 FTP server implementation
47available for Python programming language.
48
49%description -l pl.UTF-8
50Biblioteka serwera FTP dla Pythona udostępnia wysokopoziomowy,
51przenośny interfejs do łatwego tworzenia bardzo wydajnych,
52skalowalnych i asynchronicznych serwerów FTP w Pythonie. Jest to
53najpełniejsza implementacja serwera FTP wg RFC-959 dostępna dla tego
54języka programowania.
55
56%package -n python3-pyftpdlib
57Summary: Very fast asynchronous FTP server library for Python 3
58Summary(pl.UTF-8): Bardzo szybka biblioteka asynchronicznego serwera FTP dla Pythona 3
59Group: Libraries/Python
30b16124 60Requires: python3-modules >= 1:3.4
c43f343a 61Suggests: python3-pyOpenSSL
c43f343a
JB
62
63%description -n python3-pyftpdlib
64Python FTP server library provides a high-level portable interface to
65easily write very efficient, scalable and asynchronous FTP servers
66with Python. It is the most complete RFC-959 FTP server implementation
67available for Python programming language.
68
69%description -n python3-pyftpdlib -l pl.UTF-8
70Biblioteka serwera FTP dla Pythona udostępnia wysokopoziomowy,
71przenośny interfejs do łatwego tworzenia bardzo wydajnych,
72skalowalnych i asynchronicznych serwerów FTP w Pythonie. Jest to
73najpełniejsza implementacja serwera FTP wg RFC-959 dostępna dla tego
74języka programowania.
75
76%prep
77%setup -q -n pyftpdlib-%{version}
78%patch0 -p1
79%patch1 -p1
80
81%build
82%if %{with python2}
83%py_build
84
85%if %{with tests}
86PYTHONPATH=$(pwd)/build-2/lib \
87%{__python} pyftpdlib/test/runner.py
88%endif
89%endif
90
91%if %{with python3}
92%py3_build
93
94%if %{with tests}
95PYTHONPATH=$(pwd)/build-3/lib \
96%{__python3} pyftpdlib/test/runner.py
97%endif
98%endif
99
100%install
101rm -rf $RPM_BUILD_ROOT
102
103%if %{with python2}
104%py_install
105
106%py_postclean
107%{__rm} $RPM_BUILD_ROOT%{_bindir}/ftpbench
108%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pyftpdlib/test
109%endif
110
111%if %{with python3}
112%py3_install
113%{__rm} $RPM_BUILD_ROOT%{_bindir}/ftpbench
114%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pyftpdlib/test
115%endif
116
117# in case there are examples provided
118%if %{with python2}
119install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
120cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95197b76
JR
121%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
122 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
c43f343a
JB
123%endif
124%if %{with python3}
125install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyftpdlib-%{version}
126cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/python3-pyftpdlib-%{version}
95197b76
JR
127%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' \
128 $RPM_BUILD_ROOT%{_examplesdir}/python3-pyftpdlib-%{version}/*.py
c43f343a
JB
129%endif
130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python2}
135%files
136%defattr(644,root,root,755)
137%doc CREDITS HISTORY.rst LICENSE README.rst
138%{py_sitescriptdir}/pyftpdlib
139%{py_sitescriptdir}/pyftpdlib-%{version}-py*.egg-info
140%{_examplesdir}/%{name}-%{version}
141%endif
142
143%if %{with python3}
144%files -n python3-pyftpdlib
145%defattr(644,root,root,755)
146%doc CREDITS HISTORY.rst LICENSE README.rst
147%{py3_sitescriptdir}/pyftpdlib
148%{py3_sitescriptdir}/pyftpdlib-%{version}-py*.egg-info
149%{_examplesdir}/python3-pyftpdlib-%{version}
150%endif
This page took 0.101183 seconds and 4 git commands to generate.