]> git.pld-linux.org Git - packages/python-systemd.git/blob - python-systemd.spec
- release 5 (by relup.sh)
[packages/python-systemd.git] / python-systemd.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  systemd
7 Summary:        Systemd Python 2.x bindings
8 Summary(pl.UTF-8):      Wiązania do Systemd dla Pythona 2.x
9 Name:           python-%{module}
10 Version:        233
11 Release:        5
12 Epoch:          1
13 License:        LGPL
14 Group:          Development/Languages/Python
15 Source0:        https://github.com/systemd/python-systemd/archive/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  daa3ecd2c78c538cda7e8c9a7c7d8556
17 URL:            http://www.freedesktop.org/wiki/Software/systemd
18 %if %{with python2}
19 BuildRequires:  python-devel
20 BuildRequires:  python-lxml
21 BuildRequires:  python-modules
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel
25 BuildRequires:  python3-lxml
26 BuildRequires:  python3-modules
27 BuildRequires:  rpm-build >= 5.4.15-28
28 %endif
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 BuildRequires:  systemd-devel
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Systemd Python 2.x bindings.
36
37 %description -l pl.UTF-8
38 Wiązania do Systemd dla Pythona 2.x.
39
40 %package -n python3-%{module}
41 Summary:        Systemd Python 3.x bindings
42 Summary(pl.UTF-8):      Wiązania do Systemd dla Pythona 3.x
43 Group:          Development/Languages/Python
44 Requires:       python3-modules
45
46 %description -n python3-%{module}
47 Systemd Python 3.x bindings.
48
49 %description -n python3-%{module} -l pl.UTF-8
50 Wiązania do Systemd dla Pythona 3.x.
51
52 %prep
53 %setup -q
54
55 %build
56 %if %{with python2}
57 %py_build
58 %endif
59
60 %if %{with python3}
61 %py3_build
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 %if %{with python2}
67 %py_install
68 %py_postclean
69 %endif
70
71 %if %{with python3}
72 %py3_install
73 %endif
74
75 %{__rm} -r $RPM_BUILD_ROOT{%{py_sitedir},%{py3_sitedir}}/%{module}/test
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %if %{with python2}
81 %files
82 %defattr(644,root,root,755)
83 %doc NEWS README.md
84 %dir %{py_sitedir}/%{module}
85 %{py_sitedir}/%{module}/*.py[co]
86 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
87 %{py_sitedir}/%{module}_python-%{version}-py*.egg-info
88 %endif
89
90 %if %{with python3}
91 %files -n python3-%{module}
92 %defattr(644,root,root,755)
93 %doc NEWS README.md
94 %dir %{py3_sitedir}/%{module}
95 %{py3_sitedir}/%{module}/*.py
96 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
97 %{py3_sitedir}/%{module}/__pycache__
98 %{py3_sitedir}/%{module}_python-%{version}-py*.egg-info
99 %endif
This page took 0.125834 seconds and 3 git commands to generate.