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:
parent
c9d411738c
commit
0cd8b95a1b
14
macros.hpc
14
macros.hpc
@ -168,7 +168,7 @@ EOF\
|
||||
%global tmp %__elflib_exclude_path \
|
||||
%global __elflib_exclude_path (%tmp)|(^%hpc_base) \
|
||||
%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
|
||||
|
||||
%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 \
|
||||
done
|
||||
|
||||
# %hpc_python_mv_to_sitearch <file>
|
||||
# %hpc_python_mv_to_sitearch <file> [<subdir>]
|
||||
#
|
||||
# move <file> to python sitearch, remove shebang lines and
|
||||
# remove any excecute permissions.
|
||||
# move <file> to python sitearch subdir <subdir> if set, remove shebang
|
||||
# lines and remove any excecute permissions.
|
||||
# This should be done on any python files that do not contain
|
||||
# any executable code.
|
||||
%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}) \
|
||||
[ -d %{buildroot}/$_hpc_pydir ] || mkdir -p %{buildroot}/$_hpc_pydir \
|
||||
mv %{buildroot}%{1} %{buildroot}/$_hpc_pydir \
|
||||
[ -d %{buildroot}/$_hpc_pydir ] || mkdir -p %{buildroot}/${_hpc_pydir} \
|
||||
mv %{buildroot}%{1} %{buildroot}/${_hpc_pydir} \
|
||||
chmod a-x %{buildroot}/$_hpc_pydir/$_hpc_base \
|
||||
%{hpc_shebang_remove %{buildroot}/$_hpc_pydir/$_hpc_base}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user