- Use libalternatives on Tumbleweed. Include git and mercurial to properly run tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-versioningit?expand=0&rev=2
This commit is contained in:
parent
84b2dd6b51
commit
b3ee2a7337
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 3 20:14:18 UTC 2022 - Tejas Guruswamy <tejas.guruswamy@opensuse.org>
|
||||
|
||||
- Use libalternatives on Tumbleweed. Include git and mercurial to properly run tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 1 16:57:04 UTC 2022 - Tejas Guruswamy <tejas.guruswamy@opensuse.org>
|
||||
|
||||
|
@ -18,36 +18,50 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
|
||||
Name: python-versioningit
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: Versioning It with your Version In Git
|
||||
License: MIT
|
||||
URL: https://github.com/jwodder/versioningit
|
||||
Source: https://files.pythonhosted.org/packages/source/v/versioningit/versioningit-%{version}.tar.gz
|
||||
BuildRequires: python3 >= 3.7
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module setuptools}
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
Name: python-versioningit
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
Summary: Versioning It with your Version In Git
|
||||
License: MIT
|
||||
URL: https://github.com/jwodder/versioningit
|
||||
Source: https://files.pythonhosted.org/packages/source/v/versioningit/versioningit-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3 >= 3.7
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tomli >= 1.2}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytest-cov}
|
||||
BuildRequires: %{python_module pydantic}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
BuildRequires: %{python_module build}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module build}
|
||||
BuildRequires: %{python_module pydantic}
|
||||
BuildRequires: %{python_module pytest-cov}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tomli >= 1.2}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: git
|
||||
BuildRequires: mercurial
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python-packaging
|
||||
Requires: python-setuptools
|
||||
Requires: python-tomli >= 1.2
|
||||
Suggests: python-importlib-metadata >= 3.6
|
||||
Suggests: python-dataclasses
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
BuildRequires: fdupes
|
||||
Requires: python-packaging
|
||||
Requires: python-setuptools
|
||||
Requires: python-tomli >= 1.2
|
||||
Suggests: python-importlib-metadata >= 3.6
|
||||
Suggests: python-dataclasses
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -60,15 +74,18 @@ separate functions used for version extraction & calculation.
|
||||
%setup -q -n versioningit-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/versioningit
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%python_clone -a %{buildroot}%{_bindir}/versioningit
|
||||
|
||||
%check
|
||||
%pytest test
|
||||
%pytest test -k 'not test_editable_mode'
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative versioningit
|
||||
|
||||
%post
|
||||
%python_install_alternative versioningit
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:77f09ae1cb0d81263796b979da581db8c1d0de44380bcc5af51b7b81d7c4968b
|
||||
size 662205
|
||||
oid sha256:69ed77cdacc67e05935eba2fbfa40d365f555a7b08d7f1453576757d3c25ed35
|
||||
size 678420
|
||||
|
Loading…
Reference in New Issue
Block a user