forked from pool/python-deprecation
- Replace python-deprecation-no-unittest2.patch with a different upstream
patch. - Switch to autosetup and pyproject macros. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-deprecation?expand=0&rev=17
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-deprecation
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,26 +17,24 @@
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
%bcond_without python2
|
||||
Name: python-deprecation
|
||||
Version: 2.1.0
|
||||
Release: 0
|
||||
Summary: A library to handle automated deprecations
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/briancurtin/deprecation
|
||||
Source: https://files.pythonhosted.org/packages/source/d/deprecation/deprecation-%{version}.tar.gz
|
||||
# https://github.com/briancurtin/deprecation/pull/50
|
||||
# PATCH-FIX-UPSTREAM Based on gh#briancurtin/deprecation#57
|
||||
Patch0: python-deprecation-no-unittest2.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
%if %{with python2}
|
||||
BuildRequires: python-unittest2
|
||||
%endif
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-packaging
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -46,15 +44,13 @@ The `deprecation` library provides a `deprecated` decorator and a
|
||||
enable the automation of several things:
|
||||
|
||||
%prep
|
||||
%setup -q -n deprecation-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n deprecation-%{version}
|
||||
|
||||
%build
|
||||
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -63,6 +59,8 @@ enable the automation of several things:
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/deprecation.py
|
||||
%pycache_only %{python_sitelib}/__pycache__/deprecation.*.py*
|
||||
%{python_sitelib}/deprecation-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user