]> git.pld-linux.org Git - packages/python-appdirs.git/blob - python-appdirs.spec
aa1de2a1cc933094220ad804bdbb7dc480fb017b
[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 %bcond_without  setuptools      # build without setuptools (for bootstraping)
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
11 Version:        1.4.4
12 Release:        2
13 License:        MIT
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/appdirs
16 Source0:        https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz
17 # Source0-md5:  d6bca12613174185dd9abc8a29f4f012
18 URL:            https://github.com/ActiveState/appdirs
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.7
21 %{?with_setuptools:BuildRequires:      python-setuptools}
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.4
25 %{?with_setuptools:BuildRequires:      python3-setuptools}
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
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}
78 %py_build
79
80 %if %{with tests}
81 PYTHONPATH=$(pwd) \
82 %{__python} test/test_api.py
83 %endif
84 %endif
85
86 %if %{with python3}
87 %py3_build
88
89 %if %{with tests}
90 PYTHONPATH=$(pwd) \
91 %{__python3} test/test_api.py
92 %endif
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %py_install
100
101 %py_postclean
102 %endif
103
104 %if %{with python3}
105 %py3_install
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
This page took 0.064359 seconds and 2 git commands to generate.