]> git.pld-linux.org Git - packages/python-systemd.git/blame - python-systemd.spec
- this needs epoch:1 to be able to upgrade from older versions built from systemd...
[packages/python-systemd.git] / python-systemd.spec
CommitLineData
f812e21c
JR
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
7Summary: Systemd Python 2.x bindings
8Summary(pl.UTF-8): Wiązania do Systemd dla Pythona 2.x
9Name: python-%{module}
10Version: 233
28351789
JR
11Release: 2
12Epoch: 1
f812e21c
JR
13License: LGPL
14Group: Development/Languages/Python
15Source0: https://github.com/systemd/python-systemd/archive/v%{version}/%{name}-%{version}.tar.gz
16# Source0-md5: daa3ecd2c78c538cda7e8c9a7c7d8556
17URL: http://www.freedesktop.org/wiki/Software/systemd
18%if %{with python2}
19BuildRequires: python-devel
20BuildRequires: python-lxml
21BuildRequires: python-modules
22%endif
23%if %{with python3}
24BuildRequires: python3-devel
25BuildRequires: python3-lxml
26BuildRequires: python3-modules
27BuildRequires: rpm-build >= 5.4.15-28
28%endif
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.714
31BuildRequires: systemd-devel
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35Systemd Python 2.x bindings.
36
37%description -l pl.UTF-8
38Wiązania do Systemd dla Pythona 2.x.
39
40%package -n python3-%{module}
41Summary: Systemd Python 3.x bindings
42Summary(pl.UTF-8): Wiązania do Systemd dla Pythona 3.x
43Group: Development/Languages/Python
44Requires: python3-modules
45
46%description -n python3-%{module}
47Systemd Python 3.x bindings.
48
49%description -n python3-%{module} -l pl.UTF-8
50Wią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
65rm -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
78rm -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.085049 seconds and 4 git commands to generate.