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