14
0

- Clean up SPEC file to remove rpmlint warnings.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sortinghat?expand=0&rev=32
This commit is contained in:
2022-10-31 17:22:14 +00:00
committed by Git OBS Bridge
parent 48f0c2b1a3
commit 645abcea7b
2 changed files with 17 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ Sat Oct 29 01:20:39 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
* Update package dependencies
* Update jinja2 package and dev-dependencies.
* Update Poetry's package dependencies
- Clean up SPEC file to remove rpmlint warnings.
-------------------------------------------------------------------
Fri Oct 7 16:13:30 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>

View File

@@ -17,7 +17,6 @@
%define binaries stackalytics2sh mozilla2sh mailmap2sh grimoirelab2sh gitdm2sh eclipse2sh sortinghat sh2mg mg2sh
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
Name: python-sortinghat
@@ -31,7 +30,9 @@ Source0: https://files.pythonhosted.org/packages/source/s/sortinghat/sort
# PATCH-FIX-UPSTREAM no_decl_class_registry.patch gh#chaoss/grimoirelab-sortinghat#579 mcepl@suse.com
# make the package compatible with SQLAlchemy 1.4.*
Patch0: no_decl_class_registry.patch
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2 >= 3.0.1
@@ -91,14 +92,19 @@ into unique identities (and maybe affiliate them).
sed -i -e "s/\('pandoc'\|'wheel',\)//" -e 's/==/>=/' setup.py
%build
%python_build
%pyproject_wheel
%{python_expand sed -i -e '1s@/usr/bin/.*python.*$@%{$__python}@' \
sortinghat/misc/*.py sortinghat/bin/*.py
}
%install
%python_install
%pyproject_install
for b in %{binaries}; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%{python_expand rm -r %{buildroot}%{$python_sitelib}/sortinghat/{bin,misc}
%fdupes %{buildroot}%{$python_sitelib}
}
%check
exit_code=0
@@ -133,12 +139,12 @@ sed -i -e "s/'3306'/self.kwargs['port']/" tests/test_cmd_init.py
exit $exit_code
%post
for b in %{binaries}; do
for b in mg2sh sh2mg sortinghat eclipse2sh gitdm2sh grimoirelab2sh mailmap2sh mozilla2sh stackalytics2sh; do
%python_install_alternative $b
done
%postun
for b in %{binaries}; do
for b in mg2sh sh2mg sortinghat eclipse2sh gitdm2sh grimoirelab2sh mailmap2sh mozilla2sh stackalytics2sh; do
%python_uninstall_alternative $b
done
@@ -153,6 +159,7 @@ done
%python_alternative %{_bindir}/mailmap2sh
%python_alternative %{_bindir}/mozilla2sh
%python_alternative %{_bindir}/stackalytics2sh
%{python_sitelib}/*
%{python_sitelib}/sortinghat
%{python_sitelib}/sortinghat-%{version}*-info
%changelog