Accepting request 869487 from home:eeich:branches:network:cluster

- Add
  * Fix-documentation-so-that-parser-doesn-t-stumble.patch:
  * Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch
    Fix documentation building.
- Fix texinfo file installation.

OBS-URL: https://build.opensuse.org/request/show/869487
OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=7
This commit is contained in:
Egbert Eich 2021-02-04 18:31:35 +00:00 committed by Git OBS Bridge
parent 5ce7c4ee97
commit fb393edbd4
4 changed files with 114 additions and 17 deletions

View File

@ -0,0 +1,40 @@
From: Egbert Eich <eich@suse.com>
Date: Thu Feb 4 07:51:10 2021 +0100
Subject: Fix documentation so that parser doesn't stumble
Patch-mainline: Not yet
Git-commit: 7e787fef5e2c87c53166ee71670f1787300cced3
References:
Add argument to code-block::
Signed-off-by: Egbert Eich <eich@suse.com>
---
lib/spack/docs/build_systems/autotoolspackage.rst | 2 +-
lib/spack/docs/build_systems/pythonpackage.rst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst
index a4c15e5..21913a6 100644
--- a/lib/spack/docs/build_systems/autotoolspackage.rst
+++ b/lib/spack/docs/build_systems/autotoolspackage.rst
@@ -348,7 +348,7 @@ Defining ``with_or_without_verbs`` overrides the behavior of a
``--with-openib`` for older versions of the package and specifying an
alternative dependency name:
-.. code-block::
+.. code-block:: console
--with-openib=</path/to/rdma-core>
diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst
index c2da028..695b446 100644
--- a/lib/spack/docs/build_systems/pythonpackage.rst
+++ b/lib/spack/docs/build_systems/pythonpackage.rst
@@ -90,7 +90,7 @@ Instead of using the ``PythonPackage`` base class, you should extend
the ``Package`` base class and implement the following custom installation
procedure:
-.. code-block::
+.. code-block:: python
def install(self, spec, prefix):
pip = which('pip')

View File

@ -0,0 +1,40 @@
From: Egbert Eich <eich@suse.com>
Date: Thu Feb 4 09:17:55 2021 +0100
Subject: Fix error during documentation build due to recursive module inclusion
Patch-mainline: Not yet
Git-commit: 7102b892cfc6e0697b658f35b7774a03bd1c42e9
References:
Signed-off-by: Egbert Eich <eich@suse.com>
---
lib/spack/spack/user_environment.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py
index f08f21e..0da6c43 100644
--- a/lib/spack/spack/user_environment.py
+++ b/lib/spack/spack/user_environment.py
@@ -8,7 +8,7 @@
import spack.config
import spack.util.prefix as prefix
import spack.util.environment as environment
-import spack.build_environment as build_env
+import spack.build_environment
#: Environment variable name Spack uses to track individually loaded packages
spack_loaded_hashes_var = 'SPACK_LOADED_HASHES'
@@ -85,13 +85,13 @@ def environment_modifications_for_spec(spec, view=None):
# Let the extendee/dependency modify their extensions/dependents
# before asking for package-specific modifications
env.extend(
- build_env.modifications_from_dependencies(
+ build_environment.modifications_from_dependencies(
spec, context='run'
)
)
# Package specific modifications
- build_env.set_module_variables_for_package(spec.package)
+ build_environment.set_module_variables_for_package(spec.package)
spec.package.setup_run_environment(env)
return env

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Feb 4 06:54:13 UTC 2021 - Egbert Eich <eich@suse.com>
- Add
* Fix-documentation-so-that-parser-doesn-t-stumble.patch:
* Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch
Fix documentation building.
- Fix texinfo file installation.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 11 15:09:07 UTC 2020 - Christian Goll <cgoll@suse.com> Fri Dec 11 15:09:07 UTC 2020 - Christian Goll <cgoll@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package spack # spec file for package spack
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,6 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
%global flavor @BUILD_FLAVOR@%{?nil} %global flavor @BUILD_FLAVOR@%{?nil}
%if "%{flavor}" == "doc" %if "%{flavor}" == "doc"
%bcond_without doc %bcond_without doc
@ -38,7 +39,7 @@ Name: spack
Version: 0.16.0 Version: 0.16.0
Release: 0 Release: 0
Summary: Package manager for HPC systems Summary: Package manager for HPC systems
License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause License: Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause
URL: https://spack.io URL: https://spack.io
Source0: https://github.com/spack/spack/archive/v%{version}.tar.gz#/spack-%{version}.tar.gz Source0: https://github.com/spack/spack/archive/v%{version}.tar.gz#/spack-%{version}.tar.gz
Source1: README.SUSE Source1: README.SUSE
@ -48,33 +49,35 @@ Patch1: fix-tumbleweed-naming.patch
Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch Patch2: Adapt-shell-scripts-that-set-up-the-environment-for-different-shells.patch
Patch3: added-dockerfile-for-opensuse-leap-15.patch Patch3: added-dockerfile-for-opensuse-leap-15.patch
Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch Patch4: added-target-and-os-calls-to-output-of-spack-spec-co.patch
Patch5: Fix-documentation-so-that-parser-doesn-t-stumble.patch
Patch6: Fix-error-during-documentation-build-due-to-recursive-module-inclusion.patch
# upstream patch removes also problemtatic binaries # upstream patch removes also problemtatic binaries
#Patch4: spack-test-15702.patch #Patch4: spack-test-15702.patch
%if %{without doc} %if %{without doc}
BuildRequires: polkit
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: lua-lmod
BuildRequires: polkit
BuildRequires: python-base BuildRequires: python-base
BuildRequires: python3-urllib3 BuildRequires: python3-urllib3
BuildRequires: lua-lmod
Requires: %{name}-recipes = %{version} Requires: %{name}-recipes = %{version}
Requires: bzip2
Requires: curl Requires: curl
Requires: lua-lmod
Requires: polkit
Requires: gcc-fortran Requires: gcc-fortran
Requires: gpg2 Requires: gpg2
Requires: xz Requires: lua-lmod
Requires: bzip2 Requires: polkit
Requires: spack-recipes Requires: spack-recipes
Requires: xz
Recommends: spack-recipes = %version Recommends: spack-recipes = %version
Recommends: %spack_trigger_recommended Recommends: %spack_trigger_recommended
%else %else
BuildRequires: patterns-base-basesystem
BuildRequires: spack
BuildRequires: makeinfo
BuildRequires: distribution-release
BuildRequires: %{python_module Sphinx >= 1.8} BuildRequires: %{python_module Sphinx >= 1.8}
BuildRequires: %{python_module sphinxcontrib-programoutput} BuildRequires: %{python_module sphinxcontrib-programoutput}
BuildRequires: distribution-release
BuildRequires: git BuildRequires: git
BuildRequires: makeinfo
BuildRequires: patterns-base-basesystem
BuildRequires: spack
# html # html
BuildRequires: graphviz BuildRequires: graphviz
# info # info
@ -88,7 +91,6 @@ BuildArch: noarch
%define __python3 python3 %define __python3 python3
%endif %endif
%description %description
Spack is a configurable Python-based HPC package manager, automating Spack is a configurable Python-based HPC package manager, automating
the installation and fine-tuning of simulations and libraries. the installation and fine-tuning of simulations and libraries.
@ -252,7 +254,6 @@ cat >> %{buildroot}%{_sysconfdir}/skel/.spack/config.yaml <<EOF
binary_index_root: ~/.spack/indices binary_index_root: ~/.spack/indices
EOF EOF
# compile python files for python3 # compile python files for python3
# %%{buildroot}%%{spack_dir}/spack # %%{buildroot}%%{spack_dir}/spack
%py_compile . %py_compile .
@ -355,13 +356,13 @@ mkdir -p %{buildroot}%{_infodir}
mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man1
cd lib/spack/docs/_build cd lib/spack/docs/_build
cp man/spack.1.gz %{buildroot}%{_mandir}/man1/ cp man/spack.1.gz %{buildroot}%{_mandir}/man1/
cp -r texinfo/Spack.info.gz texinfo/Spack-figures %{buildroot}%{_infodir} cp -r texinfo/Spack.info.gz %{buildroot}%{_infodir}
[ -d texinfo/Spack-figures ] && cp -r texinfo/Spack-figures %{buildroot}%{_infodir}
%endif %endif
%pre %pre
getent group %spack_group >/dev/null || groupadd -r %spack_group getent group %spack_group >/dev/null || groupadd -r %spack_group
%post %post
# Replace /etc/spack/compilers.yaml # Replace /etc/spack/compilers.yaml
export GCC_VERSION=`gcc -dumpversion` export GCC_VERSION=`gcc -dumpversion`
@ -387,12 +388,12 @@ test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope syste
%triggerin -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external} %triggerin -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external}
test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system
test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install" test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install"
%triggerpostun -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external} %triggerpostun -- %{?spack_trigger_recommended} %{?spack_trigger_packages} %{?spack_trigger_external}
test -e %{_sysconfdir}/spack/no_rpm_trigger || rm /etc/spack/packages.yaml test -e %{_sysconfdir}/spack/no_rpm_trigger || rm /etc/spack/packages.yaml
test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system test -e %{_sysconfdir}/spack/no_rpm_trigger || spack external find --scope system
test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install" test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack/no_rpm_trigger to stop spack to search for new packages after a rpm install"
%if %{without doc} %if %{without doc}
%files %files
%license COPYRIGHT LICENSE-APACHE LICENSE-MIT %license COPYRIGHT LICENSE-APACHE LICENSE-MIT
@ -424,6 +425,13 @@ test -e %{_sysconfdir}/spack/no_rpm_trigger || echo "Create %{_sysconfdir}/spack
%{_localstatedir}/lib/spack/repos %{_localstatedir}/lib/spack/repos
%else %else
%post info
%install_info --info-dir=%{_infodir} --info-file="%{_infodir}/Spack.info.gz"
%preun info
%install_info_delete --info-dir=%{_infodir} --info-file="%{_infodir}/Spack.info.gz"
%files man %files man
%{_mandir}/man1/* %{_mandir}/man1/*