lbalhar / rpms / pre-commit

Forked from rpms/pre-commit 2 years ago
Clone

Blame pre-commit.spec

2ee3794
%bcond_without check
2ee3794
%global pypi_name pre-commit
2ee3794
2ee3794
Name:           %{pypi_name}
6935c96
Version:        2.5.1
6935c96
Release:        1%{?dist}
2ee3794
Summary:        Framework for managing and maintaining multi-language pre-commit hooks
2ee3794
2ee3794
License:        MIT
2ee3794
URL:            https://pre-commit.com
2ee3794
Source0:        https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
2ee3794
BuildArch:      noarch
2ee3794
6d85319
BuildRequires:  python3-devel >= 3.6.1
2ee3794
BuildRequires:  python3dist(setuptools)
2ee3794
2ee3794
%if %{with check}
2ee3794
BuildRequires:  git-core
2ee3794
BuildRequires:  python3dist(aspy.yaml)
2ee3794
BuildRequires:  python3dist(cfgv) >= 2.0.0
2ee3794
BuildRequires:  python3dist(flake8)
2ee3794
BuildRequires:  python3dist(identify) >= 1.0.0
2ee3794
%if 0%{?fedora} <= 31
2ee3794
BuildRequires:  python3dist(importlib-metadata)
2ee3794
%endif
2ee3794
BuildRequires:  python3dist(mock)
2ee3794
BuildRequires:  python3dist(nodeenv) >= 0.11.1
2ee3794
BuildRequires:  python3dist(pytest)
2ee3794
BuildRequires:  python3dist(pyyaml)
2ee3794
BuildRequires:  python3dist(six)
2ee3794
BuildRequires:  python3dist(toml)
6935c96
BuildRequires:  python3dist(virtualenv) >= 20
2ee3794
%endif
2ee3794
2ee3794
%?python_enable_dependency_generator
2ee3794
2ee3794
%description
2ee3794
A framework for managing and maintaining multi-language pre-commit hooks.
2ee3794
2ee3794
2ee3794
%prep
2ee3794
%autosetup -p1
2ee3794
2ee3794
# Remove bundled egg-info
2ee3794
rm -rf %{pypi_name}.egg-info
2ee3794
2ee3794
2ee3794
%build
2ee3794
%py3_build
2ee3794
2ee3794
2ee3794
%install
2ee3794
%py3_install
2ee3794
2ee3794
2ee3794
%if %{with check}
2ee3794
%check
2ee3794
git init
2ee3794
git config --global user.email "you@example.com"
2ee3794
git config --global user.name "Your Name"
2ee3794
export PYTHONPATH=%{buildroot}%{python3_sitelib}
2ee3794
2ee3794
# Disable few tests
2ee3794
# * 'make_archives_test' and 'repository_test' need a network connection, hence disabled.
2ee3794
# * 'install_uninstall_test' needs pytest-env (currently not packaged)
f3803fe
%{python3} -m pytest -v                                 \
f3803fe
    --deselect tests/make_archives_test.py              \
f3803fe
    --deselect tests/repository_test.py                 \
2ee3794
    --deselect tests/commands/install_uninstall_test.py
2ee3794
%endif
2ee3794
2ee3794
2ee3794
%files
2ee3794
%license LICENSE
2ee3794
%doc README.md CHANGELOG.md CONTRIBUTING.md
2ee3794
%{_bindir}/%{pypi_name}
2ee3794
%{_bindir}/%{pypi_name}-validate-config
2ee3794
%{_bindir}/%{pypi_name}-validate-manifest
2ee3794
%{python3_sitelib}/pre_commit/
2ee3794
%{python3_sitelib}/pre_commit-%{version}-py%{python3_version}.egg-info/
2ee3794
2ee3794
2ee3794
%changelog
6935c96
* Mon Jun 22 2020 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-1
6935c96
- Update to 2.5.1
6935c96
1b0433c
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-2
1b0433c
- Rebuilt for Python 3.9
1b0433c
f7a8fe3
* Wed May 13 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.4.0-1
f7a8fe3
- Update to 2.4.0
f7a8fe3
9cdca81
* Thu Apr 23 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.3.0-1
9cdca81
- Update to 2.3.0
9cdca81
6d85319
* Thu Mar 12 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.2.0-1
6d85319
- Update to 2.2.0
6d85319
6d9e79f
* Mon Feb 24 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.1.1-1
6d9e79f
- Update to 2.1.1
6d9e79f
f3803fe
* Mon Feb 24 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.1.0-1
f3803fe
- Update to 2.1.0
f3803fe
2ee3794
* Mon Jan 20 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 1.21.0-1
2ee3794
- Update to 1.21.0
2ee3794
- Thanks Aniket Pradhan <major AT fedoraproject DOT org> for help with packaging
f3803fe
- Thanks Miro Hrončok <mhroncok@redhat.com> for help with packaging
2ee3794
2ee3794
* Sun Dec 08 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.20.0-1
2ee3794
- Update to 1.20.0
2ee3794
2ee3794
* Thu Oct 24 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.18.3-8
2ee3794
- Update to 1.18.3
2ee3794
2ee3794
* Sat Mar 30 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.14.4-1
2ee3794
- Initial package