## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global _description %{expand:
Formulaic is a high-performance implementation of Wilkinson formulas for
Python.

It provides:

- high-performance dataframe to model-matrix conversions.
- support for reusing the encoding choices made during conversion of one
  data-set on other datasets.
- extensible formula parsing.
- extensible data input/output plugins, with implementations for:
  - input:
    - pandas.DataFrame
    - pyarrow.Table
  - output:
    - pandas.DataFrame
    - numpy.ndarray
    - scipy.sparse.CSCMatrix
- support for symbolic differentiation of formulas (and hence model matrices).}

Name:           python-formulaic
Version:        1.1.0
Release:        %{autorelease}
Summary:        A high-performance implementation of Wilkinson formulas

# SPDX
License:        MIT
URL:            https://github.com/matthewwardrop/formulaic
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildArch:      noarch

# The dependency libarrow is ExcludeArch on 32-bit platforms, and is the sole
# dependent package, python-pybids, plus:
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch:    %{ix86}

%description %_description

%package -n python3-formulaic
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  python3-sympy

%description -n python3-formulaic %_description

%pyproject_extras_subpkg -n python3-formulaic arrow calculus

%prep
%autosetup -n formulaic-%{version}

%generate_buildrequires
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_buildrequires -x arrow,calculus

%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel

%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_install
%pyproject_save_files -l formulaic

%check
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{pytest}

%files -n python3-formulaic -f %{pyproject_files}
%doc README.md

%changelog
## START: Generated by rpmautospec
* Mon Dec 16 2024 Packit <hello@packit.dev> - 1.1.0-1
- Update to 1.1.0 upstream release
- Resolves: rhbz#2332522

* Wed Nov 27 2024 Richard W.M. Jones <rjones@redhat.com> - 1.0.2-3
- Rebuild for libarrow 18

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Mon Jul 15 2024 Packit <hello@packit.dev> - 1.0.2-1
- Update to 1.0.2 upstream release
- Resolves: rhbz#2297834

* Mon Jun 10 2024 Python Maint <python-maint@redhat.com> - 1.0.1-5
- Rebuilt for Python 3.13

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Wed Jan 03 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.0.1-2
- Assert that the .dist-info directory contains a license file

* Mon Dec 25 2023 Packit <hello@packit.dev> - 1.0.1-1
- [packit] 1.0.1 upstream release
- Resolves rhbz#2255797

* Wed Oct 04 2023 Packit <hello@packit.dev> - 0.6.6-1
- [packit] 0.6.6 upstream release

* Tue Sep 26 2023 Packit <hello@packit.dev> - 0.6.5-1
- [packit] 0.6.5 upstream release

* Mon Aug 14 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.6.4-1
- feat: update to 0.6.4 (fixes rhbz#2190073)

* Mon Aug 14 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.2-10
- chore(packit): add config

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Apr 28 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.5.2-8
- Exclude i686

* Fri Apr 28 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.5.2-7
- Confirm License is SPDX MIT

* Fri Apr 28 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.5.2-6
- Add missing “arrow” and “calculus” extras metapackages

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.2-4
- chore: check in sources (fix rhbz#2140295)

* Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.2-3
- feat: backport patch to enable all tests

* Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.2-2
- feat: ready for review

* Thu Nov 10 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 0.5.2-1
- init
## END: Generated by rpmautospec