SHA256
1
0
forked from pool/suse-hpc

Accepting request 650115 from home:eeich:branches:science:machinelearning

- Improve python handling:
  * set python3 as default for Factory
  * allow to specify subdir to HPC pyton path

OBS-URL: https://build.opensuse.org/request/show/650115
OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=36
This commit is contained in:
Egbert Eich 2018-11-19 07:14:05 +00:00 committed by Git OBS Bridge
parent c9d411738c
commit 0cd8b95a1b
2 changed files with 14 additions and 7 deletions

View File

@ -168,7 +168,7 @@ EOF\
%global tmp %__elflib_exclude_path \ %global tmp %__elflib_exclude_path \
%global __elflib_exclude_path (%tmp)|(^%hpc_base) \ %global __elflib_exclude_path (%tmp)|(^%hpc_base) \
%undefine tmp \ %undefine tmp \
%{expand:%([ 0%{?sle_version} -ge 150000 ] && echo %%global _hpc_python3 1)} \ %{expand:%([ 0%{?sle_version} -ge 150000 -o 0%{?suse_version} -gt 1500 ] && echo %%global _hpc_python3 1)} \
%global _hpc_init_done 1 %global _hpc_init_done 1
%hpc_init(Cc:Mm:v:V:e:) %{expand:%%_hpc_init %{**}} %hpc_init(Cc:Mm:v:V:e:) %{expand:%%_hpc_init %{**}}
@ -604,17 +604,17 @@ When this package gets updated it installs the latest version of %name. \
fi \ fi \
done done
# %hpc_python_mv_to_sitearch <file> # %hpc_python_mv_to_sitearch <file> [<subdir>]
# #
# move <file> to python sitearch, remove shebang lines and # move <file> to python sitearch subdir <subdir> if set, remove shebang
# remove any excecute permissions. # lines and remove any excecute permissions.
# This should be done on any python files that do not contain # This should be done on any python files that do not contain
# any executable code. # any executable code.
%hpc_python_mv_to_sitearch() \ %hpc_python_mv_to_sitearch() \
_hpc_pydir=%hpc_python_sitearch_no_singlespec \ _hpc_pydir=%{hpc_python_sitearch_no_singlespec}%{?2:/%{2}} \
_hpc_base=$(basename %{1}) \ _hpc_base=$(basename %{1}) \
[ -d %{buildroot}/$_hpc_pydir ] || mkdir -p %{buildroot}/$_hpc_pydir \ [ -d %{buildroot}/$_hpc_pydir ] || mkdir -p %{buildroot}/${_hpc_pydir} \
mv %{buildroot}%{1} %{buildroot}/$_hpc_pydir \ mv %{buildroot}%{1} %{buildroot}/${_hpc_pydir} \
chmod a-x %{buildroot}/$_hpc_pydir/$_hpc_base \ chmod a-x %{buildroot}/$_hpc_pydir/$_hpc_base \
%{hpc_shebang_remove %{buildroot}/$_hpc_pydir/$_hpc_base} %{hpc_shebang_remove %{buildroot}/$_hpc_pydir/$_hpc_base}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 19 01:19:05 UTC 2018 - eich@suse.com
- Improve python handling:
* set python3 as default for Factory
* allow to specify subdir to HPC pyton path
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Nov 18 10:19:22 UTC 2018 - eich@suse.com Sun Nov 18 10:19:22 UTC 2018 - eich@suse.com