]> git.pld-linux.org Git - packages/python-fs.git/blame - python-fs.spec
- updated to 2.4.16
[packages/python-fs.git] / python-fs.spec
CommitLineData
20ef4f78
JB
1#
2# Conditional build:
f17d043e
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
20ef4f78
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Filesystem abstraction layer for Python 2
9Summary(pl.UTF-8): Warstwa abstrakcji systemu plików dla Pythona 2
10Name: python-fs
5efe1781
JB
11Version: 2.4.16
12Release: 1
21e35f4d 13License: MIT
20ef4f78 14Group: Libraries/Python
21e35f4d 15#Source0Download: https://pypi.org/simple/fs/
20ef4f78 16Source0: https://files.pythonhosted.org/packages/source/f/fs/fs-%{version}.tar.gz
5efe1781 17# Source0-md5: 2c9dae3d52950407fe265c3576396c33
21e35f4d
JB
18URL: https://pypi.org/project/fs/
19%if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
6c9bc6e7
JB
20BuildRequires: glibc-localedb-all
21%endif
20ef4f78
JB
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.7
73363e24 24BuildRequires: python-setuptools >= 1:38.3.0
20ef4f78 25%if %{with tests}
21e35f4d
JB
26BuildRequires: python-appdirs >= 1.4.3
27BuildRequires: python-backports.os >= 0.1
20ef4f78 28BuildRequires: python-enum34 >= 1.1.6
a6a9c16d
JB
29BuildRequires: python-mock >= 3.0
30BuildRequires: python-parameterized >= 0.8
31BuildRequires: python-psutil >= 5.0
32BuildRequires: python-pyftpdlib >= 1.5
33BuildRequires: python-pysendfile >= 2.0
34BuildRequires: python-pytest >= 4.6
35BuildRequires: python-pytest-randomly >= 1.2
20ef4f78
JB
36BuildRequires: python-pytz
37BuildRequires: python-scandir >= 1.5
38BuildRequires: python-six >= 1.10.0
21e35f4d 39BuildRequires: python-typing >= 3.6
20ef4f78
JB
40%endif
41%endif
42%if %{with python3}
21e35f4d 43BuildRequires: python3-modules >= 1:3.4
73363e24 44BuildRequires: python3-setuptools >= 1:38.3.0
20ef4f78 45%if %{with tests}
21e35f4d 46BuildRequires: python3-appdirs >= 1.4.3
a6a9c16d
JB
47BuildRequires: python3-parameterized >= 0.8
48BuildRequires: python3-psutil >= 5.0
49BuildRequires: python3-pyftpdlib >= 1.5
50BuildRequires: python3-pytest >= 4.6
51BuildRequires: python3-pytest-randomly >= 1.2
20ef4f78 52BuildRequires: python3-pytz
5efe1781 53%if "%{ver_lt '%{py3_ver}' '3.5'}" == "1"
20ef4f78
JB
54BuildRequires: python3-scandir >= 1.5
55%endif
56BuildRequires: python3-six >= 1.10.0
5efe1781 57%if "%{ver_lt '%{py3_ver}' '3.6'}" == "1"
21e35f4d
JB
58BuildRequires: python3-typing >= 3.6
59%endif
20ef4f78
JB
60%endif
61%endif
f17d043e
JB
62%if %{with doc}
63BuildRequires: python3-recommonmark >= 0.6
64BuildRequires: python3-sphinx_rtd_theme >= 0.5.1
65BuildRequires: sphinx-pdg-3 >= 3.0
66%endif
20ef4f78
JB
67BuildRequires: rpm-pythonprov
68BuildRequires: rpmbuild(macros) >= 1.714
69Requires: python-modules >= 1:2.7
70BuildArch: noarch
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73%description
74A filesystem abstraction library, successor to PyFilesystem.
75
76%description -l pl.UTF-8
77Biblioteka abstrakcji systemu plików, następca PyFilesystem.
78
79%package -n python3-fs
80Summary: Filesystem abstraction layer for Python 3
81Summary(pl.UTF-8): Warstwa abstrakcji systemu plików dla Pythona 3
82Group: Libraries/Python
21e35f4d 83Requires: python3-modules >= 1:3.4
20ef4f78
JB
84
85%description -n python3-fs
86A filesystem abstraction library, successor to PyFilesystem.
87
88%description -n python3-fs -l pl.UTF-8
89Biblioteka abstrakcji systemu plików, następca PyFilesystem.
90
f17d043e
JB
91%package apidocs
92Summary: API documentation for Python fs module
93Summary(pl.UTF-8): Dokumentacja API modułu Pythona fs
94Group: Documentation
95
96%description apidocs
97API documentation for Python fs module.
98
99%description apidocs -l pl.UTF-8
100Dokumentacja API modułu Pythona fs.
101
20ef4f78
JB
102%prep
103%setup -q -n fs-%{version}
20ef4f78 104
21e35f4d
JB
105# relies on pyftpdlib tests
106%{__rm} tests/test_ftpfs.py
20ef4f78 107
21e35f4d 108%build
20ef4f78 109%if %{with python2}
21e35f4d
JB
110%py_build
111
112%if %{with tests}
5efe1781 113# 3 tests apparently fail with python2.7
f17d043e
JB
114LC_ALL=C.UTF-8 \
115PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
116PYTHONPATH=$(pwd) \
5efe1781
JB
117%{__python} -m pytest tests \
118 -k 'not test_move_file_same_fs_read_only_source and not test_move_dir and not test_move_file'
119# -k 'not TestMove.test_move_file_same_fs_read_only_source and not TestWrapReadOnlySyspath.test_move_dir and not TestWrapReadOnlySyspath.test_move_file'
21e35f4d 120%endif
20ef4f78
JB
121%endif
122
123%if %{with python3}
21e35f4d
JB
124%py3_build
125
126%if %{with tests}
f17d043e
JB
127PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
128PYTHONPATH=$(pwd) \
129%{__python3} -m pytest tests
21e35f4d 130%endif
20ef4f78
JB
131%endif
132
f17d043e
JB
133%if %{with doc}
134%{__make} -C docs html \
135 SPHINXBUILD=sphinx-build-3
136%endif
137
20ef4f78
JB
138%install
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%py_install
143
144%py_postclean
145%endif
146
147%if %{with python3}
148%py3_install
149%endif
150
151%clean
152rm -rf $RPM_BUILD_ROOT
153
154%if %{with python2}
155%files
156%defattr(644,root,root,755)
21e35f4d 157%doc LICENSE README.md
20ef4f78
JB
158%{py_sitescriptdir}/fs
159%{py_sitescriptdir}/fs-%{version}-py*.egg-info
160%endif
161
162%if %{with python3}
163%files -n python3-fs
164%defattr(644,root,root,755)
21e35f4d 165%doc LICENSE README.md
20ef4f78
JB
166%{py3_sitescriptdir}/fs
167%{py3_sitescriptdir}/fs-%{version}-py*.egg-info
168%endif
f17d043e
JB
169
170%if %{with doc}
171%files apidocs
172%defattr(644,root,root,755)
173%doc docs/build/html/{_modules,_static,reference,*.html,*.js}
174%endif
This page took 0.13856 seconds and 4 git commands to generate.