14
0
Files
python-beartype/python-beartype.spec

88 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-beartype
#
# Copyright (c) 2025 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-beartype
Version: 0.21.0
Release: 0
Summary: Unbearably fast runtime type checking in pure Python
License: MIT
URL: https://github.com/beartype/beartype
Source: https://files.pythonhosted.org/packages/source/b/beartype/beartype-%{version}.tar.gz
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module mypy >= 0.800}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module numba}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest >= 4.0.0}
BuildRequires: %{python_module torch}
BuildRequires: %{python_module typing_extensions}
# /SECTION
BuildRequires: fdupes
Suggests: python-torch
Suggests: python-numba
Suggests: python-typing_extensions >= 3.10.0.0
Suggests: python-coverage >= 5.5
Suggests: python-sphinx
Suggests: python-pytest >= 4.0.0
Suggests: python-tox >= 3.20.1
Suggests: python-sphinx >= 4.1.0
Suggests: python-mypy >= 0.800
Suggests: python-typing_extensions
Suggests: python-numpy
Suggests: python-sphinx == 4.1.0
Suggests: python-sphinx-rtd-theme == 0.5.1
Suggests: python-sphinx
Suggests: python-pytest >= 4.0.0
Suggests: python-coverage >= 5.5
Suggests: python-mypy >= 0.800
Suggests: python-typing_extensions
Suggests: python-numpy
BuildArch: noarch
%python_subpackages
%description
Unbearably fast runtime type checking in pure Python.
%prep
%autosetup -p1 -n beartype-%{version}
Accepting request 1147086 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.17.2 * Beartype 0.17.2 nervously skitters about on thin ice. Cracks form, yet beartype 0.17.2 fails to return to shore. "What are you even doing!?", the crowd exclaims. Verily, it is best not to ask questions. * This Release Kinda Sucks, Huh? * Alright, alright. You found us out already. * Beartype 0.17.2 is an extremely minor patch release that exists purely to relax the bad assumption that all Python 3.9 releases unconditionally define the standard typing.ForwardRef.__forward_module__ dunder attribute, resolving issue #324 kindly submitted by stone-cold typonista @jvesely (Jan Vesely). Although Python ≥ 3.9.18 definitively defines this attribute, an unknown range of older Python 3.9 patch releases fail to do so. * Beartype 0.17.2 resolves this by naively pretending that all Python 3.9 releases fail to do so. Although kinda non-ideal, it's unclear whether this attribute is even used (i.e., set to a string) under Python 3.9. In fact, it's unclear whether this attribute is even used anywhere, ever. It probably will be under Python ≥ 3.13, but that's putting the proverbial cart before the horse. Anyyyyyyway. * We now return to your regularly scheduled Python hackathon. - Release 0.17.1 * Beartype 0.17.1 gently descends from the heavens on a golden dragon made of rainbows. "How can this be!?", the crowd exclaims. Verily, it is best not to ask questions. * This patch release adds explicit support for typing.NamedTuple subclasses under PEP 56 OBS-URL: https://build.opensuse.org/request/show/1147086 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beartype?expand=0&rev=19
2024-02-16 16:57:16 +00:00
# disable bogus shebang (do not remove in order to keep same line numbers for tests)
find . -name '*.py' -exec sed -i '1{s/^#!.*$/# beartype python script/}' '{}' ';'
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
Accepting request 1147086 from home:bnavigator:branches:devel:languages:python:numeric - Update to 0.17.2 * Beartype 0.17.2 nervously skitters about on thin ice. Cracks form, yet beartype 0.17.2 fails to return to shore. "What are you even doing!?", the crowd exclaims. Verily, it is best not to ask questions. * This Release Kinda Sucks, Huh? * Alright, alright. You found us out already. * Beartype 0.17.2 is an extremely minor patch release that exists purely to relax the bad assumption that all Python 3.9 releases unconditionally define the standard typing.ForwardRef.__forward_module__ dunder attribute, resolving issue #324 kindly submitted by stone-cold typonista @jvesely (Jan Vesely). Although Python ≥ 3.9.18 definitively defines this attribute, an unknown range of older Python 3.9 patch releases fail to do so. * Beartype 0.17.2 resolves this by naively pretending that all Python 3.9 releases fail to do so. Although kinda non-ideal, it's unclear whether this attribute is even used (i.e., set to a string) under Python 3.9. In fact, it's unclear whether this attribute is even used anywhere, ever. It probably will be under Python ≥ 3.13, but that's putting the proverbial cart before the horse. Anyyyyyyway. * We now return to your regularly scheduled Python hackathon. - Release 0.17.1 * Beartype 0.17.1 gently descends from the heavens on a golden dragon made of rainbows. "How can this be!?", the crowd exclaims. Verily, it is best not to ask questions. * This patch release adds explicit support for typing.NamedTuple subclasses under PEP 56 OBS-URL: https://build.opensuse.org/request/show/1147086 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-beartype?expand=0&rev=19
2024-02-16 16:57:16 +00:00
%pytest -k 'not (test_doc_readme or test_sphinx or test_pep561_mypy)'
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/beartype
%{python_sitelib}/beartype-%{version}*-info
%changelog