From e9b367ec9aede9ff0a103a52d1ea73f6f73fbf57f88971ae1c11ab0472563ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 18 Mar 2020 11:56:14 +0000 Subject: [PATCH] Accepting request 786145 from home:mcalabkova:branches:devel:languages:python - Update to 2.2.0 * Add conda as a new language. * Remove python2 / python3.5 support. Note that pre-commit still supports running hooks written in python2, but pre-commit itself requires python 3.6+. * Removed pcre language, use pygrep instead. * Don't filter GIT_SSL_NO_VERIFY from environment when cloning. * Replace aspy.yaml with sort_keys=False. * Add support for perl. * Fix python healthy() check when python executable goes missing. * Many more fixes and improvements, see upstream changelog OBS-URL: https://build.opensuse.org/request/show/786145 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pre-commit?expand=0&rev=4 --- pre_commit-1.20.0.tar.gz | 3 -- pre_commit-2.2.0.tar.gz | 3 ++ python-pre-commit.changes | 15 +++++++++ python-pre-commit.spec | 65 +++++++++++++++++---------------------- 4 files changed, 46 insertions(+), 40 deletions(-) delete mode 100644 pre_commit-1.20.0.tar.gz create mode 100644 pre_commit-2.2.0.tar.gz diff --git a/pre_commit-1.20.0.tar.gz b/pre_commit-1.20.0.tar.gz deleted file mode 100644 index 607d790..0000000 --- a/pre_commit-1.20.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb7d75eb07be0557455cad16968746ed5fa609e04a0dccf83c446bfa3477bf45 -size 209840 diff --git a/pre_commit-2.2.0.tar.gz b/pre_commit-2.2.0.tar.gz new file mode 100644 index 0000000..6f9321e --- /dev/null +++ b/pre_commit-2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53a5d39e8b2063a004ecdabd4b459ae826cfe47eca449720e4fdde06a7d43cc0 +size 216542 diff --git a/python-pre-commit.changes b/python-pre-commit.changes index aab67d3..9995618 100644 --- a/python-pre-commit.changes +++ b/python-pre-commit.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Mar 18 11:26:55 UTC 2020 - Marketa Calabkova + +- Update to 2.2.0 + * Add conda as a new language. + * Remove python2 / python3.5 support. Note that pre-commit still + supports running hooks written in python2, but pre-commit itself + requires python 3.6+. + * Removed pcre language, use pygrep instead. + * Don't filter GIT_SSL_NO_VERIFY from environment when cloning. + * Replace aspy.yaml with sort_keys=False. + * Add support for perl. + * Fix python healthy() check when python executable goes missing. + * Many more fixes and improvements, see upstream changelog + ------------------------------------------------------------------- Fri Nov 1 14:44:33 CET 2019 - Matej Cepl diff --git a/python-pre-commit.spec b/python-pre-commit.spec index adf9798..c8122ca 100644 --- a/python-pre-commit.spec +++ b/python-pre-commit.spec @@ -1,7 +1,7 @@ # # spec file for package python-pre-commit # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,8 +18,9 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-pre-commit -Version: 1.20.0 +Version: 2.2.0 Release: 0 Summary: Multi-language pre-commit hooks License: MIT @@ -29,35 +30,24 @@ Source: https://github.com/pre-commit/pre-commit/archive/v%{version}.tar BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-PyYAML -Requires: python-aspy.yaml -Requires: python-cfgv >= 1.4.0 +Requires: python-PyYAML >= 5.1 +Requires: python-cfgv >= 2.0.0 Requires: python-identify >= 1.0.0 -Requires: python-importlib-metadata Requires: python-nodeenv >= 0.11.1 -Requires: python-six Requires: python-toml Requires: python-virtualenv >= 15.2 -%ifpython2 -Requires: python-futures -Requires: python-importlib_resources -%endif BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module PyYAML} -BuildRequires: %{python_module aspy.yaml} -BuildRequires: %{python_module cfgv >= 1.4.0} +BuildRequires: %{python_module PyYAML >= 5.1} +BuildRequires: %{python_module cfgv >= 2.0.0} BuildRequires: %{python_module identify >= 1.0.0} -BuildRequires: %{python_module importlib-metadata} BuildRequires: %{python_module mock} BuildRequires: %{python_module nodeenv >= 0.11.1} -BuildRequires: %{python_module pytest-runner} -BuildRequires: %{python_module six} +BuildRequires: %{python_module pytest-env} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module toml} BuildRequires: %{python_module virtualenv >= 15.2} BuildRequires: git-core -BuildRequires: python2-futures -BuildRequires: python2-importlib_resources BuildRequires: python3 # /SECTION %python_subpackages @@ -67,8 +57,7 @@ A framework for managing and maintaining multi-language pre-commit hooks. %prep %setup -q -n pre-commit-%{version} -rm pre_commit/color_windows.py -sed -i 's|^#!/usr/bin/env python|#!%{_bindir}/python|' pre_commit/resources/hook-tmpl +sed -i 's|^#!%{_bindir}/env python|#!%{_bindir}/python|' pre_commit/resources/hook-tmpl %build %python_build @@ -77,29 +66,31 @@ sed -i 's|^#!/usr/bin/env python|#!%{_bindir}/python|' pre_commit/resources/hook %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -# %%check -# export GIT_AUTHOR_NAME=test GIT_COMMITTER_NAME=test \ -# GIT_AUTHOR_EMAIL=test@example.com GIT_COMMITTER_EMAIL=test@example.com \ -# VIRTUALENV_NO_DOWNLOAD=1 PRE_COMMIT_NO_CONCURRENCY=1 +%check +export GIT_AUTHOR_NAME=test GIT_COMMITTER_NAME=test \ + GIT_AUTHOR_EMAIL=test@example.com GIT_COMMITTER_EMAIL=test@example.com \ + VIRTUALENV_NO_DOWNLOAD=1 PRE_COMMIT_NO_CONCURRENCY=1 # # gh#pre-commit/pre-commit#1202 -# # test_switch_language_versions_doesnt_clobber - looks like your installation of python2 is broken? +# # test_switch_language_versions_doesnt_clobber - looks like your installation of python is broken? # # test_run_a_ruby_hook, test_additional_ruby_dependencies_installed: you need to have gem installed # # test_golang_hook, test_golang_hook_still_works_when_gobin_is_set, test_additional_golang_dependencies_installed, test_local_golang_additional_dependencies: you need to have go installed # # test_rust_hook, test_additional_rust_lib_dependencies_installed, test_local_rust_additional_dependencies: you need to have cargo installed # # test_installed_from_venv I suspect you have some PYTHONPATH shenanigans going on? hard to tell -# # test_healthy_types_py_in_cwd: no idea, probably a problem with your environment -# EXCLUDED_TESTS="test_main or test_run_a_node_hook or test_run_versioned_node_hook or test_additional_node_dependencies_installed" -# EXCLUDED_TESTS="$EXCLUDED_TESTS or test_run_versioned_ruby_hook or test_run_ruby_hook_with_disable_shared_gems or test_additional_dependencies_roll_forward" -# EXCLUDED_TESTS="$EXCLUDED_TESTS or test_golang or test_additional_ruby_ or test_additional_golang_ or test_additional_rust_ or test_rust" -# EXCLUDED_TESTS="$EXCLUDED_TESTS or test_switch_language_versions_doesnt_clobber or test_run_a_ruby_hook or test_local_golang_additional_dependencies" -# EXCLUDED_TESTS="$EXCLUDED_TESTS or test_local_rust_additional_dependencies or test_installed_from_venv or test_healthy_types_py_in_cwd" -# git init . -# %%pytest -k "not ($EXCLUDED_TESTS)" +# # conda tests: we do not have conda +# # test_perl_hook, test_local_perl_additional_dependencies: need internet +EXCLUDED_TESTS="test_main or test_run_a_node_hook or test_run_versioned_node_hook or test_additional_node_dependencies_installed" +EXCLUDED_TESTS="$EXCLUDED_TESTS or test_run_versioned_ruby_hook or test_run_ruby_hook_with_disable_shared_gems or test_additional_dependencies_roll_forward" +EXCLUDED_TESTS="$EXCLUDED_TESTS or test_golang or test_additional_ruby_ or test_additional_golang_ or test_additional_rust_ or test_rust" +EXCLUDED_TESTS="$EXCLUDED_TESTS or test_switch_language_versions_doesnt_clobber or test_run_a_ruby_hook or test_local_golang_additional_dependencies" +EXCLUDED_TESTS="$EXCLUDED_TESTS or test_local_rust_additional_dependencies or test_installed_from_venv" +EXCLUDED_TESTS="$EXCLUDED_TESTS or conda or test_perl_hook or test_local_perl_additional_dependencies" +git init . +%pytest -k "not ($EXCLUDED_TESTS)" %files %{python_files} -%python3_only %{_bindir}/pre-commit-validate-manifest -%python3_only %{_bindir}/pre-commit -%python3_only %{_bindir}/pre-commit-validate-config +%{_bindir}/pre-commit-validate-manifest +%{_bindir}/pre-commit +%{_bindir}/pre-commit-validate-config %{python_sitelib}/* %changelog