%global pkgvers 0
%global scdate0 20250315
%global sctags0 2.8.1
%global branch0 master
%global source0 https://github.com/scikit-learn-contrib/category_encoders.git

Name:           python-category_encoders
Version:        %(curl -s https://raw.githubusercontent.com/scikit-learn-contrib/category_encoders/refs/heads/master/category_encoders/__init__.py | grep __version__ | cut -d"'" -f2)
Release:        %{scdate0}.%{pkgvers}%{?dist}
Summary:        Categorical Encoding Methods
License:        BSD
BuildArch:      noarch

URL:            https://github.com/scikit-learn-contrib/category_encoders

BuildRequires:  git python3-devel python3-setuptools python3-pip
BuildRequires:  python3-scikit-learn python3-pandas python3-wheel
BuildRequires:  python3-poetry python3-statsmodels python3-scipy python3-patsy

%description
A set of scikit-learn-style transformers for encoding categorical
variables into numeric by means of different techniques.


%package -n     python3-category_encoders
Summary:        %{summary}
Provides:       python-category_encoders

%description -n python3-category_encoders
A set of scikit-learn-style transformers for encoding categorical
variables into numeric by means of different techniques.


%prep
%setup -T -c -n %{name}
git clone --depth 1 -n -b %{sctags0} %{source0} .
git reset --hard %{sctags0}
git log --format=fuller


%build
%pyproject_wheel


%install
%pyproject_install
rm -rf %{buildroot}%{python3_sitelib}/examples


%files -n python3-category_encoders
%license LICENSE.md
%doc README.md
%doc examples
%{python3_sitelib}/category_encoders/
%{python3_sitelib}/category_encoders-*.dist-info/


%changelog
* Fri Mar 29 2019 Balint Cristian <cristian.balint@gmail.com>
- github upstream releases