14
0
Files
python-quicktions/python-quicktions.spec
Daniel Garcia b0e3dbb56b - Enable python 3.11 build again, now is supported
- Update to 1.14
  - Implement __format__ for Fraction, following python/cpython#100161
  - Implement Fraction.is_integer(), following python/cpython#100488
  - Fraction.limit_denominator() is faster, following
    python/cpython#93730
  - Internal creation of result Fractions is about 10% faster if the
    calculated numerator/denominator pair is already normalised,
    following python/cpython#101780
  - Built using Cython 3.0.0b1.
- 1.13
  - Parsing very long numbers from a fraction string was very slow,
    even slower than fractions.Fraction. The parser is now faster in
    all cases (and still much faster for shorter numbers).
  - Fraction did not implement __int__.
    https://bugs.python.org/issue44547
- 1.12
  - Faster and more space friendly pickling and unpickling.
    https://bugs.python.org/issue44154
  - Algorithmically faster arithmetic for large denominators, although
    slower for small fraction components.
    https://bugs.python.org/issue43420 Original patch for CPython by
    Sergey B. Kirpichev and Raymond Hettinger.
  - Make sure bool(Fraction) always returns a bool.
    https://bugs.python.org/issue39274
  - Built using Cython 3.0.0a10.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-quicktions?expand=0&rev=13
2023-03-20 06:46:13 +00:00

73 lines
2.3 KiB
RPMSpec

#
# spec file for package python-quicktions
#
# Copyright (c) 2023 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-quicktions
Version: 1.14
Release: 0
Summary: Fast fractions data type for rational numbers
License: Python-2.0
Group: Development/Languages/Python
URL: https://github.com/scoder/quicktions
Source: https://files.pythonhosted.org/packages/source/q/quicktions/quicktions-%{version}.tar.gz
BuildRequires: %{python_module Cython3}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module pytest}
# /SECTION
%python_subpackages
%description
Python's Fraction data type is an excellent way to do exact money
calculations and largely beats Decimal in terms of simplicity,
accuracy and safety. Clearly not in terms of speed, though, given
the cdecimal accelerator in Py3.3+.
Quicktions is an adaptation of the original fractions module
(as included in CPython 3.5) that is compiled and optimised with
Cython into a fast, native extension module.
Compared to the standard library fractions module in Py2.7 and
Py3.4, quicktions is currently about 10x faster, and still about
6x faster than the current version in Python 3.5. It's also about
15x faster than the (Python implemented) decimal module in Py2.7.
%prep
%setup -q -n quicktions-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
export PYTHONDONTWRITEBYTECODE=1
%pytest_arch --capture=no
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE
%{python_sitearch}/*
%changelog