]> git.pld-linux.org Git - packages/python-appdirs.git/blob - python-appdirs.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-appdirs.git] / python-appdirs.spec
1 #
2 # Conditional build:
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 #
7 Summary:        Python 2 module to choose appropriate application directories
8 Summary(pl.UTF-8):      Moduł Pythona 2 do wyboru właściwych katalogów aplikacji
9 Name:           python-appdirs
10 Version:        1.4.0
11 Release:        4
12 License:        MIT
13 Group:          Development/Languages/Python
14 #Source0Download: https://pypi.python.org/pypi/appdirs
15 Source0:        https://pypi.python.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz
16 # Source0-md5:  1d17b4c9694ab84794e228f28dc3275b
17 URL:            https://github.com/ActiveState/appdirs
18 %if %{with python2}
19 BuildRequires:  python-devel >= 1:2.4
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-devel >= 1:3.2
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.710
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 appdirs is a module that helps you choose an appropriate:
31  - user data dir
32  - user config dir
33  - user cache dir
34  - site data dir
35  - site config dir
36  - user log dir
37
38 %description -l pl.UTF-8
39 appdirs to moduł pomagający wybrać właściwy katalog dla:
40  - danych użytkownika
41  - konfiguracji użytkownika
42  - pamięci podręcznej użytkownika
43  - danych systemu
44  - konfiguracji systemu
45  - logów użytkownika
46
47 %package -n python3-appdirs
48 Summary:        Python 3 module to choose appropriate application directories
49 Summary(pl.UTF-8):      Moduł Pythona 3 do wyboru właściwych katalogów aplikacji
50 Group:          Development/Languages/Python
51
52 %description -n python3-appdirs
53 appdirs is a module that helps you choose an appropriate:
54  - user data dir
55  - user config dir
56  - user cache dir
57  - site data dir
58  - site config dir
59  - user log dir
60
61 %description -n python3-appdirs -l pl.UTF-8
62 appdirs to moduł pomagający wybrać właściwy katalog dla:
63  - danych użytkownika
64  - konfiguracji użytkownika
65  - pamięci podręcznej użytkownika
66  - danych systemu
67  - konfiguracji systemu
68  - logów użytkownika
69
70 %prep
71 %setup -q -n appdirs-%{version}
72
73 %build
74 %if %{with python2}
75 %py_build \
76         --build-base build-2 %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %py3_build \
81         --build-base build-3 %{?with_tests:test}
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_build \
89                 --build-base build-2 \
90         install \
91                 --skip-build \
92                 --optimize=2 \
93                 --root=$RPM_BUILD_ROOT
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_build \
100                 --build-base build-3 \
101         install \
102                 --skip-build \
103                 --optimize=2 \
104                 --root=$RPM_BUILD_ROOT
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with python2}
111 %files
112 %defattr(644,root,root,755)
113 %doc CHANGES.rst LICENSE.txt README.rst
114 %{py_sitescriptdir}/appdirs.py[co]
115 %{py_sitescriptdir}/appdirs-%{version}-py*.egg-info
116 %endif
117
118 %if %{with python3}
119 %files -n python3-appdirs
120 %defattr(644,root,root,755)
121 %doc CHANGES.rst LICENSE.txt README.rst
122 %{py3_sitescriptdir}/appdirs.py
123 %{py3_sitescriptdir}/__pycache__/appdirs.cpython-*.py[co]
124 %{py3_sitescriptdir}/appdirs-%{version}-py*.egg-info
125 %endif
This page took 0.225246 seconds and 4 git commands to generate.