-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update python-nptyping to version 2.5.0 / rev 4 via SR 1147711
https://build.opensuse.org/request/show/1147711 by user mcepl + anag+factory - Did the upstream just released different tarball with the same version number? Yes, they did! - Rebased patches - Update to 2.5.0 * Added the column wildcard in structure expressions to allow expressing 'a structure with at least ...'. * Fixed the help text for functions that use nptyping types as hints. * Fixed the distribution of dataframe.pyi that was missing. * Fixed the sdist to include tests and dependencies. - Fix the test suite. * The -k parameter for unittests does not know negative patterns * Don't test with beartype and typeguard: gh#ramonhagenaars/nptyping#115 * Drop skip-pyright-tests.patch, delete file instead * Drop skip_pandas.patch.
- Loading branch information
1 parent
299b502
commit 0424855
Showing
9 changed files
with
134 additions
and
101 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/ipfs/bafkreihd2nnvhl4wpzx3ib6dafx7tk5osvgtubli67gbhjdbbbbcj2hcbi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
------------------------------------------------------------------- | ||
Tue Feb 20 08:10:28 UTC 2024 - Matej Cepl <[email protected]> | ||
|
||
- Did the upstream just released different tarball with the same | ||
version number? Yes, they did! | ||
- Rebased patches | ||
|
||
------------------------------------------------------------------- | ||
Fri Feb 16 12:21:58 UTC 2024 - Ben Greiner <[email protected]> | ||
|
||
- Update to 2.5.0 | ||
* Added the column wildcard in structure expressions to allow | ||
expressing 'a structure with at least ...'. | ||
* Fixed the help text for functions that use nptyping types as | ||
hints. | ||
* Fixed the distribution of dataframe.pyi that was missing. | ||
* Fixed the sdist to include tests and dependencies. | ||
- Fix the test suite. | ||
* The -k parameter for unittests does not know negative patterns | ||
* Don't test with beartype and typeguard: | ||
gh#ramonhagenaars/nptyping#115 | ||
* Drop skip-pyright-tests.patch, delete file instead | ||
* Drop skip_pandas.patch. | ||
|
||
------------------------------------------------------------------- | ||
Fri Dec 9 11:44:19 UTC 2022 - Daniel Garcia <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# spec file for package python-nptyping | ||
# | ||
# Copyright (c) 2022 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 | ||
|
@@ -16,40 +16,45 @@ | |
# | ||
|
||
|
||
%define modname nptyping | ||
# pyright is a nodejs package and nobody dares to package it for openSUSE | ||
%bcond_with pyright | ||
# beartype and typeguard: https://github.com/ramonhagenaars/nptyping/issues/115 | ||
%bcond_with beartype | ||
%bcond_with typeguard | ||
# mypy tests expect pandas_stubs, which are not in the distribution | ||
%bcond_with pandas_stubs | ||
Name: python-nptyping | ||
Version: 2.4.1 | ||
Version: 2.5.0 | ||
Release: 0 | ||
Summary: Type hints for NumPy | ||
License: MIT | ||
URL: https://github.com/ramonhagenaars/nptyping | ||
Source: https://github.com/ramonhagenaars/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz | ||
# PATCH-FIX-OPENSUSE use_system_packages.patch gh#ramonhagenaars/nptyping#72 [email protected] | ||
# Don't need to build the wheel a second time, when creating venv for install check, allow use of system packages | ||
Patch0: use_system_packages.patch | ||
Source: https://files.pythonhosted.org/packages/source/n/nptyping/nptyping-%{version}.tar.gz | ||
# PATCH-FIX-UPSTREAM skip_on_other_archs.patch gh#ramonhagenaars/nptyping#73 [email protected] | ||
# test_instance_check_performance doesn't seem to work well on some architectures | ||
Patch1: skip_on_other_archs.patch | ||
# PATCH-FIX-OPENSUSE skip-pyright-tests.patch [email protected] -- pyright is a nodejs package and nobody dares to package it for openSUSE | ||
Patch2: skip-pyright-tests.patch | ||
Patch0: skip_on_other_archs.patch | ||
# PATCH-FIX-OPENSUSE use_system_packages.patch gh#ramonhagenaars/nptyping#72 [email protected] | ||
# Don't need to build the wheel a second time, when creating venv for install check, allow use of system packages | ||
Patch1: use_system_packages.patch | ||
BuildRequires: %{python_module pip} | ||
BuildRequires: %{python_module setuptools} | ||
BuildRequires: %{python_module wheel} | ||
BuildRequires: fdupes | ||
BuildRequires: python-rpm-macros | ||
BuildRequires: unzip | ||
Requires: python-numpy >= 1.20.0 | ||
Requires: (python-numpy >= 1.21.5 with python-numpy < 2) | ||
%if 0%{python_version_nodots} < 310 | ||
Requires: python-typing_extensions >= 4.0.0 | ||
Requires: (python-typing_extensions >= 4.0.0 with python-typing_extensions < 5) | ||
%endif | ||
BuildArch: noarch | ||
# SECTION test requirements | ||
BuildRequires: %{python_module beartype} | ||
BuildRequires: %{python_module feedparser} | ||
BuildRequires: %{python_module mypy} | ||
BuildRequires: %{python_module numpy >= 1.20.0} | ||
%{?_with_pandas_stubs:BuildRequires: %{python_module mypy}} | ||
%{?_with_beartype:BuildRequires: %{python_module beartype}} | ||
%{?_with_typeguard:BuildRequires: %{python_module typeguard}} | ||
BuildRequires: %{python_module numpy >= 1.20.0 with %python-numpy < 2} | ||
BuildRequires: %{python_module pandas} | ||
BuildRequires: %{python_module typeguard} | ||
BuildRequires: %{python_module typing_extensions < 5 if %python-base < 3.10} | ||
BuildRequires: %{python_module typing_extensions >= 4.0.0 if %python-base < 3.10} | ||
# /SECTION | ||
%python_subpackages | ||
|
@@ -60,6 +65,8 @@ Type hints for NumPy. | |
%prep | ||
%autosetup -p1 -n nptyping-%{version} | ||
|
||
sed -i -e 's/\r//g' README.md | ||
|
||
%build | ||
%pyproject_wheel | ||
|
||
|
@@ -71,13 +78,16 @@ Type hints for NumPy. | |
# wheel in dist/ used by test/test_wheel.py | ||
mkdir -p dist/ | ||
cp build/nptyping-%{version}-py3-none-any.whl dist/ | ||
# There's no python-pandas-stubs package in Factory yet | ||
%pyunittest -v -k 'not test_mypi' | ||
%{!?_with_pyright:rm tests/test_pyright.py} | ||
%{!?_with_beartype:rm tests/test_beartype.py} | ||
%{!?_with_typeguard:rm tests/test_typeguard.py} | ||
%{!?_with_pandas_stubs:rm tests/test_mypy.py tests/pandas_/test_mypy_dataframe.py tests/pandas_/test_fork_sync.py} | ||
%pyunittest -v | ||
|
||
%files %{python_files} | ||
%doc README.md | ||
%license LICENSE | ||
%{python_sitelib}/%{modname} | ||
%{python_sitelib}/%{modname}-%{version}*-info | ||
%{python_sitelib}/nptyping | ||
%{python_sitelib}/nptyping-%{version}.dist-info | ||
|
||
%changelog |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
--- | ||
tests/test_wheel.py | 9 +++++---- | ||
1 file changed, 5 insertions(+), 4 deletions(-) | ||
tests/test_wheel.py | 13 +++---------- | ||
1 file changed, 3 insertions(+), 10 deletions(-) | ||
|
||
Index: nptyping-2.2.0/tests/test_wheel.py | ||
=================================================================== | ||
--- nptyping-2.2.0.orig/tests/test_wheel.py | ||
+++ nptyping-2.2.0/tests/test_wheel.py | ||
@@ -80,12 +80,8 @@ class WheelTest(TestCase): | ||
|
||
def test_wheel_is_built_correctly(self): | ||
with working_dir(_ROOT): | ||
- subprocess.check_output(f"{sys.executable} -m invoke wheel", shell=True) | ||
wheel_files = glob(f"dist/*{__version__}*.whl") | ||
- src_files = glob(f"dist/*{__version__}*.tar.gz") | ||
- | ||
self.assertEqual(1, len(wheel_files)) | ||
- self.assertEqual(1, len(src_files)) | ||
|
||
with ZipFile(_ROOT / Path(wheel_files[0]), "r") as zip_: | ||
files_in_wheel = set( | ||
@@ -98,10 +94,9 @@ class WheelTest(TestCase): | ||
|
||
def test_wheel_can_be_installed(self): | ||
with working_dir(Path(self.temp_dir.name)): | ||
- venv.create(_VENV_NAME, with_pip=False) | ||
- # For some reason, with_pip=True fails, so we do it separately. | ||
- subprocess.check_output( | ||
- f"{self.py} -m ensurepip --upgrade --default-pip", shell=True | ||
+ venv.create(_VENV_NAME, system_site_packages=True, with_pip=True) | ||
+ print( | ||
+ f"{self.pip} install {_ROOT / 'dist' / _WHEEL_NAME}" | ||
) | ||
subprocess.check_output( | ||
f"{self.pip} install {_ROOT / 'dist' / _WHEEL_NAME}", shell=True | ||
--- a/tests/test_wheel.py | ||
+++ b/tests/test_wheel.py | ||
@@ -90,12 +90,9 @@ class WheelTest(TestCase): | ||
|
||
def test_wheel_is_built_correctly(self): | ||
with working_dir(_ROOT): | ||
- subprocess.check_output(f"{sys.executable} -m invoke wheel", shell=True) | ||
wheel_files = glob(f"dist/*{__version__}*.whl") | ||
- src_files = glob(f"dist/*{__version__}*.tar.gz") | ||
|
||
self.assertEqual(1, len(wheel_files)) | ||
- self.assertEqual(1, len(src_files)) | ||
|
||
with ZipFile(_ROOT / Path(wheel_files[0]), "r") as zip_: | ||
files_in_wheel = set( | ||
@@ -108,17 +105,13 @@ class WheelTest(TestCase): | ||
|
||
def test_wheel_can_be_installed(self): | ||
with working_dir(Path(self.temp_dir.name)): | ||
- venv.create(_VENV_NAME, with_pip=False) | ||
- # For some reason, with_pip=True fails, so we do it separately. | ||
- subprocess.check_output( | ||
- f"{self.py} -m ensurepip --upgrade --default-pip", shell=True | ||
+ venv.create(_VENV_NAME, system_site_packages=True, with_pip=True) | ||
+ print( | ||
+ f"{self.pip} install {_ROOT / 'dist' / _WHEEL_NAME}" | ||
) | ||
subprocess.check_output( | ||
f"{self.py} -m pip install --upgrade pip", shell=True | ||
) | ||
- subprocess.check_output( | ||
- f"{self.pip} install {_ROOT / 'dist' / _WHEEL_NAME}", shell=True | ||
- ) | ||
# No errors raised? Then the install succeeded. | ||
|
||
def test_basic_nptyping_code(self): |