From 2ee37942a18075f7d09a8718a066da4e02e85e7a Mon Sep 17 00:00:00 2001 From: chedi toueiti Date: Feb 24 2020 14:57:27 +0000 Subject: initial commit --- diff --git a/pre-commit.spec b/pre-commit.spec new file mode 100644 index 0000000..7d88005 --- /dev/null +++ b/pre-commit.spec @@ -0,0 +1,96 @@ +%bcond_without check +%global pypi_name pre-commit + +Name: %{pypi_name} +Version: 1.21.0 +Release: 1%{?dist} +Summary: Framework for managing and maintaining multi-language pre-commit hooks + +License: MIT +URL: https://pre-commit.com +Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel >= 3.6 +BuildRequires: python3dist(setuptools) + +%if %{with check} +BuildRequires: git-core +BuildRequires: python3dist(aspy.yaml) +BuildRequires: python3dist(cfgv) >= 2.0.0 +BuildRequires: python3dist(flake8) +BuildRequires: python3dist(identify) >= 1.0.0 +%if 0%{?fedora} <= 31 +BuildRequires: python3dist(importlib-metadata) +%endif +BuildRequires: python3dist(mock) +BuildRequires: python3dist(nodeenv) >= 0.11.1 +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pyyaml) +BuildRequires: python3dist(six) +BuildRequires: python3dist(toml) +BuildRequires: python3dist(virtualenv) >= 15.2 +%endif + +%?python_enable_dependency_generator + +%description +A framework for managing and maintaining multi-language pre-commit hooks. + + +%prep +%autosetup -p1 + +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + + +%build +%py3_build + + +%install +%py3_install + + +%if %{with check} +%check +git init +git config --global user.email "you@example.com" +git config --global user.name "Your Name" +export PYTHONPATH=%{buildroot}%{python3_sitelib} + +# Disable few tests +# * 'make_archives_test' and 'repository_test' need a network connection, hence disabled. +# * 'install_uninstall_test' needs pytest-env (currently not packaged) +%{python3} -m pytest -v \ + --deselect tests/make_archives_test.py \ + --deselect tests/repository_test.py \ + --deselect tests/commands/install_uninstall_test.py +%endif + + +%files +%license LICENSE +%doc README.md CHANGELOG.md CONTRIBUTING.md +%{_bindir}/%{pypi_name} +%{_bindir}/%{pypi_name}-validate-config +%{_bindir}/%{pypi_name}-validate-manifest +%{python3_sitelib}/pre_commit/ +%{python3_sitelib}/pre_commit-%{version}-py%{python3_version}.egg-info/ + + +%changelog +* Mon Jan 20 2020 Artem Polishchuk - 1.21.0-1 +- Update to 1.21.0 +- Thanks Aniket Pradhan for help with packaging +- Thanks Miro Hrončok for help with packaging + +* Sun Dec 08 2019 Artem Polishchuk - 1.20.0-1 +- Update to 1.20.0 + +* Thu Oct 24 2019 Artem Polishchuk - 1.18.3-8 +- Update to 1.18.3 + +* Sat Mar 30 2019 Artem Polishchuk - 1.14.4-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..94cdc9f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pre-commit-1.21.0.tar.gz) = f53cf33dbc6a32321ba5afcbd4b65034da111ad52085c28a7c749e291e65a0da353ba22c23d8f010eaa5885b371ae86b26e406bf89741fc053af728cb5605aed \ No newline at end of file