-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelloworld-python-binding.spec
More file actions
69 lines (57 loc) · 1.9 KB
/
Copy pathhelloworld-python-binding.spec
File metadata and controls
69 lines (57 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%global debug_package %{nil}
Name: helloworld-python-binding
Version: 2.0.0
Release: 1%{?dist}
License: Apache-2.0
Summary: Python helloworld service used in redpesk
URL: https://github.com/redpesk-samples/helloworld-python-binding
Source: %{name}-%{version}.tar.gz
%global _afmappdir %{_prefix}/redpesk
%global appdir %{_afmappdir}/%{name}
%global redtest_dir %{_libexecdir}/redtest/%{name}
BuildRequires: python3
Requires: python3
Requires: afb-libpython
%description
Provides the Python implementation of the redpesk helloworld API. It exposes
hello, sum, the automatically generated info verb and the verb_called event.
%package redtest
Summary: redtest package for %{name}
Requires: %{name} = %{version}-%{release}
Requires: python3
Requires: afb-libpython
%description redtest
Functional redtest package for the Python helloworld service.
%prep
%autosetup
%build
python3 -m compileall -q helloworld_python_binding
%install
# Install the native application and Python package.
install -Dm755 bin/helloworld-python-binding \
%{buildroot}%{appdir}/bin/helloworld-python-binding
install -Dm644 helloworld_python_binding/__init__.py \
%{buildroot}%{appdir}/lib/helloworld_python_binding/__init__.py
install -Dm644 helloworld_python_binding/__main__.py \
%{buildroot}%{appdir}/lib/helloworld_python_binding/__main__.py
install -Dm644 helloworld_python_binding/binding.py \
%{buildroot}%{appdir}/lib/helloworld_python_binding/binding.py
install -Dm644 rpconfig/manifest.yml \
%{buildroot}%{appdir}/.rpconfig/manifest.yml
# Install redtest scripts.
install -Dm755 redtest/run-redtest \
%{buildroot}%{redtest_dir}/run-redtest
install -Dm644 tests/tests.py \
%{buildroot}%{redtest_dir}/tests.py
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md CHANGELOG
%dir %{appdir}
%{appdir}/bin/
%{appdir}/lib/
%{appdir}/.rpconfig/
%files redtest
%defattr(-,root,root)
%{redtest_dir}/run-redtest
%{redtest_dir}/tests.py