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