2018-05-03 05:19:22 +00:00
|
|
|
|
#
|
|
|
|
|
# spec file for package python-versioneer
|
|
|
|
|
#
|
2025-08-26 09:27:59 +00:00
|
|
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
2018-05-03 05:19:22 +00:00
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-12-04 14:12:50 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-03 05:19:22 +00:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-08-26 09:27:59 +00:00
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
|
%bcond_without libalternatives
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with libalternatives
|
|
|
|
|
%endif
|
2023-05-22 08:55:28 +00:00
|
|
|
|
%{?sle15_python_module_pythons}
|
2018-05-03 05:19:22 +00:00
|
|
|
|
Name: python-versioneer
|
2023-09-25 22:52:53 +00:00
|
|
|
|
Version: 0.29
|
2018-05-03 05:19:22 +00:00
|
|
|
|
Release: 0
|
2018-06-07 06:51:09 +00:00
|
|
|
|
Summary: VCS-based management of project version strings
|
2022-10-11 18:07:25 +00:00
|
|
|
|
License: Unlicense
|
2018-05-03 05:19:22 +00:00
|
|
|
|
Group: Development/Languages/Python
|
2021-08-28 10:08:12 +00:00
|
|
|
|
URL: https://github.com/warner/python-versioneer
|
2018-05-03 05:19:22 +00:00
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/v/versioneer/versioneer-%{version}.tar.gz
|
2023-05-28 09:08:27 +00:00
|
|
|
|
BuildRequires: %{python_module pip}
|
2018-05-03 05:19:22 +00:00
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-08-28 10:08:12 +00:00
|
|
|
|
BuildRequires: %{python_module testsuite}
|
2023-05-28 09:08:27 +00:00
|
|
|
|
BuildRequires: %{python_module tomli if %python-base < 3.11}
|
|
|
|
|
BuildRequires: %{python_module wheel}
|
2018-05-03 05:19:22 +00:00
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildArch: noarch
|
2025-08-26 09:27:59 +00:00
|
|
|
|
%if %{with libalternatives}
|
|
|
|
|
BuildRequires: alts
|
|
|
|
|
Requires: alts
|
|
|
|
|
%else
|
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
|
%endif
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Versioneer is a tool to automatically update version strings (in
|
|
|
|
|
setup.py and the conventional ‘from PROJECT import _version’ pattern)
|
2018-06-07 06:51:09 +00:00
|
|
|
|
by asking the version control system about the current tree.
|
2018-05-03 05:19:22 +00:00
|
|
|
|
|
2023-05-28 09:08:27 +00:00
|
|
|
|
%package toml
|
|
|
|
|
Summary: VCS-based management of project version strings [toml] extra
|
|
|
|
|
Requires: python-versioneer = %{version}
|
|
|
|
|
Requires: (python-tomli if python-base < 3.11)
|
|
|
|
|
|
|
|
|
|
%description toml
|
|
|
|
|
Versioneer is a tool to automatically update version strings (in
|
|
|
|
|
setup.py and the conventional ‘from PROJECT import _version’ pattern)
|
|
|
|
|
by asking the version control system about the current tree.
|
|
|
|
|
|
|
|
|
|
This package provides the [toml] extra
|
|
|
|
|
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n versioneer-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
2023-05-28 09:08:27 +00:00
|
|
|
|
%pyproject_wheel
|
2018-05-03 05:19:22 +00:00
|
|
|
|
|
|
|
|
|
%install
|
2023-05-28 09:08:27 +00:00
|
|
|
|
%pyproject_install
|
|
|
|
|
%python_expand sed -i '1{/^#!/d}' %{buildroot}%{$python_sitelib}/versioneer.py
|
2025-08-26 09:27:59 +00:00
|
|
|
|
%{python_compileall}
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/versioneer
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2021-08-28 10:20:23 +00:00
|
|
|
|
%pyunittest -v test/test_file.py
|
2018-05-03 05:19:22 +00:00
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%python_install_alternative versioneer
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative versioneer
|
|
|
|
|
|
2025-08-26 09:27:59 +00:00
|
|
|
|
%pre
|
|
|
|
|
%python_libalternatives_reset_alternative versioneer
|
|
|
|
|
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.md
|
2023-05-28 09:08:27 +00:00
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python_sitelib}/versioneer.py*
|
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/versioneer*.pyc
|
|
|
|
|
%{python_sitelib}/versioneer-%{version}.dist-info
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%python_alternative %{_bindir}/versioneer
|
|
|
|
|
|
2023-05-28 09:08:27 +00:00
|
|
|
|
%files %{python_files toml}
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
2018-05-03 05:19:22 +00:00
|
|
|
|
%changelog
|