]> git.pld-linux.org Git - packages/python-prctl.git/blame - python-prctl.spec
rebuild with tests and docs
[packages/python-prctl.git] / python-prctl.spec
CommitLineData
926cf60f
AM
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module prctl
7Summary: Allows to control specific characteristics of a process’ behaviour
8Name: python-%{module}
9Version: 1.5.0
422ed271 10Release: 3
926cf60f
AM
11License: GPL v3
12Group: Libraries/Python
13Source0: https://github.com/seveas/python-prctl/archive/v%{version}.tar.gz
14# Source0-md5: 1fb338e9ffce5f654c91e8d44b018734
15URL: https://pythonhosted.org/python-prctl/
16BuildRequires: python-devel
17BuildRequires: python-distribute
18BuildRequires: rpm-pythonprov
19# if py_postclean is used
18e698cc 20BuildRequires: rpmbuild(macros) >= 1.710
926cf60f
AM
21# when python3 present
22BuildRequires: libcap-devel
23BuildRequires: sed >= 4.0
24%if %{with python3}
25BuildRequires: python3-devel
926cf60f
AM
26BuildRequires: python3-modules
27%endif
28Requires: python-modules
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32The linux prctl function allows you to control specific
33characteristics of a process’ behaviour.
34
35%package -n python3-%{module}
36Summary: Allows to control specific characteristics of a process’ behaviour
37Group: Libraries/Python
38
39%description -n python3-%{module}
40The linux prctl function allows you to control specific
41characteristics of a process’ behaviour.
42
43%package apidoc
44Summary: %{module} API documentation
45Summary(pl.UTF-8): Dokumentacja API %{module}
46Group: Documentation
47
48%description apidoc
49API documentation for %{module}.
50
51%description apidoc -l pl.UTF-8
52Dokumentacja API %{module}.
53
54%prep
55%setup -q
56
57%build
58%if %{with python2}
bf5b9add 59%py_build
926cf60f
AM
60%endif
61
62%if %{with python3}
bf5b9add 63%py3_build
926cf60f
AM
64%endif
65
66%if %{with doc}
67cd docs
68%{__make} -j1 html
69rm -rf _build/html/_sources
70%endif
71
72%install
73rm -rf $RPM_BUILD_ROOT
74
75%if %{with python2}
bf5b9add 76%py_install
926cf60f
AM
77
78%py_postclean
79%endif
80
81%if %{with python3}
bf5b9add 82%py3_install
926cf60f
AM
83%endif
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
89%files
90%defattr(644,root,root,755)
91%doc README
92%{py_sitedir}/*.py[co]
93%attr(755,root,root) %{py_sitedir}/*.so
94%if "%{py_ver}" > "2.4"
95%{py_sitedir}/python_%{module}-*.egg-info
96%endif
97%endif
98
99%if %{with python3}
100%files -n python3-%{module}
101%defattr(644,root,root,755)
102%doc README
103%{py3_sitedir}/__pycache__/%{module}.*.py[co]
104%{py3_sitedir}/%{module}.py
105%attr(755,root,root) %{py3_sitedir}/_%{module}.*.so
106%{py3_sitedir}/python_%{module}-%{version}-py*.egg-info
107%endif
108
109%if %{with doc}
110%files apidoc
111%defattr(644,root,root,755)
112%doc docs/_build/html/*
113%endif
This page took 0.113159 seconds and 4 git commands to generate.