Skip to content

Commit

Permalink
Merge pull request #76 from meaksh/main-add-integration-with-venv-sal…
Browse files Browse the repository at this point in the history
…t-minion

Make "shaptools" available inside the Salt Bundle (venv-salt-minion) (bsc#1212695)
  • Loading branch information
yeoldegrove authored Nov 27, 2023
2 parents 67772ff + fee0d65 commit c560630
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="filename">python-shaptools</param>
<param name="versionformat">0.3.13+git.%ct.%h</param>
<param name="versionformat">0.3.14+git.%ct.%h</param>
<param name="revision">%%VERSION%%</param>
</service>

Expand Down
6 changes: 6 additions & 0 deletions python-shaptools.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Nov 21 11:22:48 UTC 2023 - Pablo Suárez Hernández <[email protected]>

- Create version 0.3.14
- Make shaptools available for venv-salt-minion (bsc#1212695)

-------------------------------------------------------------------
Fri Jan 13 02:13:36 UTC 2023 - Steve Kowalik <[email protected]>

Expand Down
36 changes: 36 additions & 0 deletions python-shaptools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ BuildArch: noarch
%description
API to expose SAP HANA functionalities

%package -n python3-shaptools-venv-salt-minion
Summary: Shaptools integration with Salt Bundle
Group: Development/Languages/Python
Requires: venv-salt-minion
Requires: python3-shaptools
Supplements: packageand(python3-shaptools:venv-salt-minion)
BuildArch: noarch

%description -n python3-shaptools-venv-salt-minion
Integration of shaptools library inside the Salt Bundle, aka venv-salt-minion.

%prep
%setup -q -n %{name}-%{version}

Expand All @@ -71,6 +82,29 @@ API to expose SAP HANA functionalities
%postun
%python_uninstall_alternative shapcli

%post -n python3-shaptools-venv-salt-minion
BUNDLE_SITELIB=
if [ -f /usr/lib/venv-salt-minion/bin/python ]
then
BUNDLE_SITELIB=`/usr/lib/venv-salt-minion/bin/python -c "import sysconfig as s; print(s.get_paths().get('purelib'))"`
fi
if [ ! -z "$BUNDLE_SITELIB" ] && [ -d "%{python_sitelib}/shaptools" ] && [ ! -f "$BUNDLE_SITELIB/shaptools" ]
then
ln -s %{python_sitelib}/shaptools/ $BUNDLE_SITELIB/shaptools
fi

%postun -n python3-shaptools-venv-salt-minion
BUNDLE_SITELIB=
if [ -f /usr/lib/venv-salt-minion/bin/python ]
then
BUNDLE_SITELIB=`/usr/lib/venv-salt-minion/bin/python -c "import sysconfig as s; print(s.get_paths().get('purelib'))"`
fi
if [ ! -z "$BUNDLE_SITELIB" ] && [ -L "$BUNDLE_SITELIB/shaptools" ]
then
rm $BUNDLE_SITELIB/shaptools
fi


%if %{with test}
%check
%pytest tests
Expand All @@ -86,4 +120,6 @@ API to expose SAP HANA functionalities
%{python_sitelib}/*
%python_alternative %{_bindir}/shapcli

%files -n python3-shaptools-venv-salt-minion

%changelog
2 changes: 1 addition & 1 deletion shaptools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
:since: 2018-11-15
"""

__version__ = "0.3.13"
__version__ = "0.3.14"

0 comments on commit c560630

Please sign in to comment.