]> git.pld-linux.org Git - packages/python3-platformdirs.git/blob - python3-platformdirs.spec
8d066f05c820c409514d0a751b625f6e34d2fe6d
[packages/python3-platformdirs.git] / python3-platformdirs.spec
1 # TODO: finish tests and doc
2 #
3 # Conditional build
4 %bcond_with     tests   # unit tests (need some packages update)
5 %bcond_with     doc     # Sphinx documentation
6
7 %define         module  platformdirs
8 Summary:        Python module for determining appropriate platform-specific dirs
9 Summary(pl.UTF-8):      Moduł Pythona do określania odpowiednich katalogów specyficznych dla platformy
10 Name:           python3-%{module}
11 Version:        2.5.1
12 Release:        2
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/platformdirs/
16 Source0:        https://files.pythonhosted.org/packages/source/p/platformdirs/%{module}-%{version}.tar.gz
17 # Source0-md5:  83d3ce3feb4af1ccfaca24375574f44d
18 URL:            https://pypi.org/project/platformdirs/
19 BuildRequires:  python3-modules >= 1:3.7
20 BuildRequires:  python3-setuptools
21 %if %{with tests}
22 BuildRequires:  python3-appdirs = 1.4.4
23 BuildRequires:  python3-pytest >= 6
24 BuildRequires:  python3-pytest-cov >= 2.7
25 BuildRequires:  python3-pytest-mock >= 3.6
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 %if %{with doc}
30 BuildRequires:  python3-furo >= 2021.7.5b38
31 BuildRequires:  python3-proselint >= 0.10.2
32 BuildRequires:  python3-sphinx-autodoc-typehints >= 1.12
33 BuildRequires:  sphinx-pdg >= 4
34 %endif
35 Requires:       python3-modules >= 1:3.7
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 A small Python module for determining appropriate platform-specific
41 dirs, e.g. a "user data dir".
42
43 %description -l pl.UTF-8
44 Mały moduł Pythona do określania odpowiednich katalogów specyficznych
45 dla platformy, np. "katalog danych użytkownika".
46
47 %prep
48 %setup -q -n %{module}-%{version}
49
50 %build
51 %py3_build
52
53 %if %{with tests}
54 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
55 PYTEST_PLUGINS=pytest_cov.plugin,pytest_mock \
56 %{__python3} -m pytest tests
57 %endif
58
59 %if %{with doc}
60 sphinx-build -b html -d docs/_build/doctree docs docs/_build/html
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 %py3_install
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc CHANGES.rst README.rst
74 %dir %{py3_sitescriptdir}/%{module}
75 %{py3_sitescriptdir}/%{module}/*.py
76 %{py3_sitescriptdir}/%{module}/__pycache__
77 %{py3_sitescriptdir}/%{module}/py.typed
78 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
This page took 0.064349 seconds and 2 git commands to generate.