]>
Commit | Line | Data |
---|---|---|
eb721b42 JB |
1 | # |
2 | # Conditional build: | |
92b681e1 JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
5 | %bcond_without tests # do not perform "setup.py test" | |
6 | %bcond_without setuptools # build without setuptools (for bootstraping) | |
eb721b42 JB |
7 | # |
8 | Summary: Python 2 module to choose appropriate application directories | |
9 | Summary(pl.UTF-8): Moduł Pythona 2 do wyboru właściwych katalogów aplikacji | |
10 | Name: python-appdirs | |
92b681e1 | 11 | Version: 1.4.4 |
775d953b | 12 | Release: 4 |
eb721b42 JB |
13 | License: MIT |
14 | Group: Development/Languages/Python | |
4f4736f3 | 15 | #Source0Download: https://pypi.org/simple/appdirs |
48b0344f | 16 | Source0: https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz |
92b681e1 | 17 | # Source0-md5: d6bca12613174185dd9abc8a29f4f012 |
eb721b42 JB |
18 | URL: https://github.com/ActiveState/appdirs |
19 | %if %{with python2} | |
92b681e1 | 20 | BuildRequires: python-devel >= 1:2.7 |
230d9d92 | 21 | %{?with_setuptools:BuildRequires: python-setuptools} |
eb721b42 JB |
22 | %endif |
23 | %if %{with python3} | |
92b681e1 | 24 | BuildRequires: python3-devel >= 1:3.4 |
230d9d92 | 25 | %{?with_setuptools:BuildRequires: python3-setuptools} |
539b1e2d | 26 | %endif |
eb721b42 | 27 | BuildRequires: rpm-pythonprov |
48b0344f | 28 | BuildRequires: rpmbuild(macros) >= 1.714 |
eb721b42 JB |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | appdirs is a module that helps you choose an appropriate: | |
34 | - user data dir | |
35 | - user config dir | |
36 | - user cache dir | |
37 | - site data dir | |
38 | - site config dir | |
39 | - user log dir | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | appdirs to moduł pomagający wybrać właściwy katalog dla: | |
43 | - danych użytkownika | |
44 | - konfiguracji użytkownika | |
45 | - pamięci podręcznej użytkownika | |
46 | - danych systemu | |
47 | - konfiguracji systemu | |
48 | - logów użytkownika | |
49 | ||
50 | %package -n python3-appdirs | |
51 | Summary: Python 3 module to choose appropriate application directories | |
52 | Summary(pl.UTF-8): Moduł Pythona 3 do wyboru właściwych katalogów aplikacji | |
53 | Group: Development/Languages/Python | |
54 | ||
55 | %description -n python3-appdirs | |
56 | appdirs is a module that helps you choose an appropriate: | |
57 | - user data dir | |
58 | - user config dir | |
59 | - user cache dir | |
60 | - site data dir | |
61 | - site config dir | |
62 | - user log dir | |
63 | ||
64 | %description -n python3-appdirs -l pl.UTF-8 | |
65 | appdirs to moduł pomagający wybrać właściwy katalog dla: | |
66 | - danych użytkownika | |
67 | - konfiguracji użytkownika | |
68 | - pamięci podręcznej użytkownika | |
69 | - danych systemu | |
70 | - konfiguracji systemu | |
71 | - logów użytkownika | |
72 | ||
73 | %prep | |
74 | %setup -q -n appdirs-%{version} | |
75 | ||
76 | %build | |
77 | %if %{with python2} | |
acae4980 JB |
78 | %py_build |
79 | ||
80 | %if %{with tests} | |
81 | PYTHONPATH=$(pwd) \ | |
82 | %{__python} test/test_api.py | |
83 | %endif | |
eb721b42 JB |
84 | %endif |
85 | ||
86 | %if %{with python3} | |
acae4980 JB |
87 | %py3_build |
88 | ||
89 | %if %{with tests} | |
90 | PYTHONPATH=$(pwd) \ | |
91 | %{__python3} test/test_api.py | |
92 | %endif | |
eb721b42 JB |
93 | %endif |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
d3018022 | 99 | %py_install |
eb721b42 JB |
100 | |
101 | %py_postclean | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
d3018022 | 105 | %py3_install |
eb721b42 JB |
106 | %endif |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc CHANGES.rst LICENSE.txt README.rst | |
115 | %{py_sitescriptdir}/appdirs.py[co] | |
116 | %{py_sitescriptdir}/appdirs-%{version}-py*.egg-info | |
117 | %endif | |
118 | ||
119 | %if %{with python3} | |
120 | %files -n python3-appdirs | |
121 | %defattr(644,root,root,755) | |
122 | %doc CHANGES.rst LICENSE.txt README.rst | |
123 | %{py3_sitescriptdir}/appdirs.py | |
124 | %{py3_sitescriptdir}/__pycache__/appdirs.cpython-*.py[co] | |
125 | %{py3_sitescriptdir}/appdirs-%{version}-py*.egg-info | |
126 | %endif |