Blame python-pyfim.spec

3cc2e04
# If the package needs to download data for the test which cannot be done in
3cc2e04
# koji, these can be disabled in koji by using `bcond_with` instead, but the
3cc2e04
# tests must be validated in mock with network enabled like so:
3cc2e04
# mock -r fedora-rawhide-x86_64 rebuild <srpm> --enable-network --rpmbuild-opts="--with tests"
3cc2e04
%bcond_with tests
3cc2e04
3cc2e04
%global pypi_name pyfim
3cc2e04
3cc2e04
%global desc %{expand: \
3cc2e04
PyFIM is an extension module that makes several frequent item set mining
3cc2e04
implementations available as functions in Python 2.7.x & 3.5.x. Currently
3cc2e04
apriori, eclat, fpgrowth, sam, relim, carpenter, ista, accretion and apriacc
3cc2e04
are available as functions, although the interfaces do not offer all of the
3cc2e04
options of the command line program. (Note that lcm is available as an
3cc2e04
algorithm mode of eclat.) There is also a "generic" function fim, which is
3cc2e04
essentially the same function as fpgrowth, only with a simplified interface
3cc2e04
(fewer options). Finally, there is a function arules for generating association
3cc2e04
rules (simplified interface compared to apriori, eclat and fpgrowth, which can
3cc2e04
also be used to generate association rules.
3cc2e04
3cc2e04
How to use the functions can be seen in the example scripts testfim.py and
3cc2e04
testacc.py in the source package (directory pyfim/ex). From a Python script or
3cc2e04
command prompt interface, call help(fim), help(apriori) (or help(fim.apriori)),
3cc2e04
help(eclat) (or help(fim.eclat)) etc. or print, for example, apriori.__doc__,
3cc2e04
eclat.__doc__ etc. for a description of the functions and their arguments.
3cc2e04
3cc2e04
This extension module was originally developed for Python 2.7. The shared
3cc2e04
objects made available above were compiled particularly for Python 2.7.11 and
3cc2e04
Python 3.5.1 on Ubuntu 16.04 LTS and the dynamic modules made available above
3cc2e04
were compiled for Python 2.7.10 and Python 3.5.1 on Windows 10.}
3cc2e04
3cc2e04
Name:           python-%{pypi_name}
3cc2e04
Version:        6.28
3f52163
Release:        12%{?dist}
3cc2e04
Summary:        Frequent Item Set Mining and Association Rule Induction
3cc2e04
3cc2e04
License:        MIT
3cc2e04
URL:            http://www.borgelt.net/%{pypi_name}.html
3cc2e04
Source0:        http://www.borgelt.net/src/%{pypi_name}.tar.gz
3cc2e04
3cc2e04
%{?python_enable_dependency_generator}
3cc2e04
3cc2e04
%description
3cc2e04
%{desc}
3cc2e04
3cc2e04
3cc2e04
%package -n python3-%{pypi_name}
3cc2e04
Summary:        %{summary}
3cc2e04
BuildRequires:  gcc
3cc2e04
BuildRequires:  python3-devel
3cc2e04
BuildRequires:  %{py3_dist Cython}
3cc2e04
%{?python_provide:%python_provide python3-%{pypi_name}}
3cc2e04
3cc2e04
%description -n python3-%{pypi_name}
3cc2e04
%{desc}
3cc2e04
3cc2e04
%prep
3cc2e04
%autosetup -c -n %{pypi_name}-%{version}
3cc2e04
rm -rf %{pypi_name}.egg-info
3cc2e04
3cc2e04
# Remove date stamp from version
3cc2e04
sed -i "s/version=.*/version='6.28',/" setup.py
3cc2e04
3cc2e04
# Comment out to remove /usr/bin/env shebangs
3cc2e04
# Can use something similar to correct/remove /usr/bin/python shebangs also
3cc2e04
# find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
3cc2e04
3cc2e04
%build
3cc2e04
%py3_build
3cc2e04
3cc2e04
%install
3cc2e04
%py3_install
3cc2e04
3cc2e04
%check
3cc2e04
%if %{with tests}
3cc2e04
%{__python3} setup.py test
3cc2e04
%endif
3cc2e04
3cc2e04
%files -n python3-%{pypi_name}
3cc2e04
# All sub directories contain this file
3cc2e04
%license pyfim/doc/mit-license.txt
47cc42e
%{python3_sitearch}/fim-%{version}-py%{python3_version}.egg-info
3cc2e04
%{python3_sitearch}/fim.cpython-%{python3_version_nodots}*.so
3cc2e04
3cc2e04
%changelog
3f52163
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-12
3f52163
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
3f52163
99aecec
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.28-11
99aecec
- Rebuilt for Python 3.11
99aecec
d0479c0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-10
d0479c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
d0479c0
b811392
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-9
b811392
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
b811392
cc0e3b0
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.28-8
cc0e3b0
- Rebuilt for Python 3.10
cc0e3b0
63bbf0a
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-7
63bbf0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
63bbf0a
f72e620
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-6
f72e620
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f72e620
09060f5
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 6.28-5
09060f5
- Rebuilt for Python 3.9
09060f5
d9b68d7
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-4
d9b68d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d9b68d7
4f4ffdc
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 6.28-3
4f4ffdc
- Rebuilt for Python 3.8
4f4ffdc
339d9a5
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.28-2
339d9a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
339d9a5
3cc2e04
* Wed Jun 12 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 6.28-1
3cc2e04
- Use better file entry
3cc2e04
3cc2e04
* Mon Jun 10 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 6.28-1
3cc2e04
- Initial build