1
0

Accepting request 1109381 from devel:languages:python:numeric

- Add patch remove-future-requirement.patch, remove requirement for future
- Switch to pyproject and autosetup macros

OBS-URL: https://build.opensuse.org/request/show/1109381
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-uncertainties?expand=0&rev=14
This commit is contained in:
Ana Guerrero 2023-09-07 19:13:06 +00:00 committed by Git OBS Bridge
commit 394a4f9727
3 changed files with 29 additions and 13 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 7 01:51:59 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch remove-future-requirement.patch, remove requirement for future
- Switch to pyproject and autosetup macros
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 23 06:34:32 UTC 2022 - Arun Persaud <arun@gmx.de> Thu Jun 23 06:34:32 UTC 2022 - Arun Persaud <arun@gmx.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-uncertainties # spec file for package python-uncertainties
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,24 +16,23 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-uncertainties Name: python-uncertainties
Version: 3.1.7 Version: 3.1.7
Release: 0 Release: 0
Summary: Uncertainties on the Quantities Involved (aka "Error Propagation") Summary: Uncertainties on the Quantities Involved (aka "Error Propagation")
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/lebigot/uncertainties/ URL: https://github.com/lebigot/uncertainties/
Source: https://files.pythonhosted.org/packages/source/u/uncertainties/uncertainties-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/u/uncertainties/uncertainties-%{version}.tar.gz
BuildRequires: %{python_module future} Patch0: remove-future-requirement.patch
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testsuite} BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module tools} BuildRequires: %{python_module tools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: %{python_module numpy if (%python-base without python36-base)}
Requires: python-future
BuildArch: noarch BuildArch: noarch
%if 0%{?suse_version} %if 0%{?suse_version}
Recommends: python-numpy Recommends: python-numpy
@ -46,26 +45,24 @@ performed transparently. Much more complex mathematical expressions
involving numbers with uncertainties can also be evaluated directly. involving numbers with uncertainties can also be evaluated directly.
%prep %prep
%setup -q -n uncertainties-%{version} %autosetup -p1 -n uncertainties-%{version}
sed -i -e '/^#!\//, 1d' uncertainties/1to2.py sed -i -e '/^#!\//, 1d' uncertainties/1to2.py
sed -i -e '/^#!\//, 1d' uncertainties/lib1to2/test_1to2.py sed -i -e '/^#!\//, 1d' uncertainties/lib1to2/test_1to2.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
# no python36-numpy %pytest
python36_ignore="--ignore uncertainties/unumpy"
%pytest ${$python_ignore}
%files %{python_files} %files %{python_files}
%license LICENSE.txt %license LICENSE.txt
%doc README.rst %doc README.rst
%{python_sitelib}/uncertainties/ %{python_sitelib}/uncertainties/
%{python_sitelib}/uncertainties-%{version}*-info %{python_sitelib}/uncertainties-%{version}.dist-info
%changelog %changelog

View File

@ -0,0 +1,13 @@
Index: uncertainties-3.1.7/setup.py
===================================================================
--- uncertainties-3.1.7.orig/setup.py
+++ uncertainties-3.1.7/setup.py
@@ -337,7 +337,7 @@ try:
'Source': 'https://github.com/lebigot/uncertainties'
},
- install_requires=['future'],
+ install_requires=[],
tests_require=['nose', 'numpy'],