提交 9909e7e8 编写于 作者: C Cleber Rosa

SPEC: make bash package independent of Python version

And favor a system wide path for `avocado exec-path`, in the same way
we prefer the `/etc/avocado` files.  If not running from packages, the
Python version specific location will be used.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 3e2e21f1
......@@ -14,6 +14,8 @@
Libexec PATHs modifier
"""
import os
from pkg_resources import resource_filename
from avocado.core.output import LOG_UI
from avocado.core.plugin_interfaces import CLICmd
......@@ -34,4 +36,8 @@ class ExecPath(CLICmd):
:param args: Command line args received from the run subparser.
"""
LOG_UI.debug(resource_filename("avocado", "libexec"))
system_wide = '/usr/libexec/avocado'
if os.path.isdir(system_wide):
LOG_UI.debug(system_wide)
else:
LOG_UI.debug(resource_filename("avocado", "libexec"))
......@@ -203,8 +203,8 @@ popd
%{__cp} -r examples/yaml_to_mux %{buildroot}%{_datadir}/avocado
%{__cp} -r examples/yaml_to_mux_loader %{buildroot}%{_datadir}/avocado
%{__cp} -r examples/varianter_pict %{buildroot}%{_datadir}/avocado
%{__mkdir} -p %{buildroot}%{_libexecdir}/
ln -s %{python_sitelib}/avocado/libexec/ %{buildroot}%{_libexecdir}/avocado
%{__mkdir} -p %{buildroot}%{_libexecdir}/avocado
%{__mv} %{buildroot}%{python_sitelib}/avocado/libexec/* %{buildroot}%{_libexecdir}/avocado
%check
%if %{with_tests}
......@@ -479,7 +479,6 @@ A small set of utilities to interact with Avocado from the Bourne
Again Shell code (and possibly other similar shells).
%files bash
%{python_sitelib}/avocado/libexec*
%{_libexecdir}/avocado*
%changelog
......@@ -488,6 +487,7 @@ Again Shell code (and possibly other similar shells).
- Removed extra dependencies on Fedora 24 for runner-remote
- Added python-avocado requirement for golang plugin
- Added new common sub-package
- Make bash package independent of Python version
* Thu Mar 8 2018 Cleber Rosa <cleber@redhat.com> - 59.0-1
- Remove backward compatibility with name avocado
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册