forked from pool/python-pre-commit
Accepting request 753196 from home:mcepl:branches:devel:languages:python
First submit. OBS-URL: https://build.opensuse.org/request/show/753196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pre-commit?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
pre_commit-1.20.0.tar.gz
Normal file
3
pre_commit-1.20.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb7d75eb07be0557455cad16968746ed5fa609e04a0dccf83c446bfa3477bf45
|
||||
size 209840
|
57
python-pre-commit.changes
Normal file
57
python-pre-commit.changes
Normal file
@@ -0,0 +1,57 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 1 14:44:33 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Update to 1.20.0:
|
||||
Allow building newer versions of ruby.
|
||||
Fix rare race condition with multiple concurrent first-time runs.
|
||||
Allow --hook-type to be specified multiple times.
|
||||
example: pre-commit install --hook-type pre-commit
|
||||
--hook-type pre-push
|
||||
Include more version information in crash logs.
|
||||
Hook colors are now passed through on platforms which support pty.
|
||||
pre-commit now uses importlib.metadata directly when running
|
||||
in python 3.8
|
||||
Remove some extra newlines from error messages.
|
||||
When a hook is not executable it now reports not executable
|
||||
instead of not found.
|
||||
Fix interleaving of stdout / stderr in hooks.
|
||||
Fix python environment healthy() check when current working
|
||||
directory contains modules which shadow standard library
|
||||
names.
|
||||
Regexes handling both backslashes and forward slashes for
|
||||
directory separators now only need to handle forward
|
||||
slashes.
|
||||
Fix node_modules plugin installation on windows
|
||||
Make default python lookup more deterministic to avoid
|
||||
redundant installs
|
||||
Fix installation of rust hooks with new cargo
|
||||
Use the current running executable if it matches the
|
||||
requested language_version
|
||||
Print the stage when a hook is not found
|
||||
pre-commit autoupdate now supports non-master default branches
|
||||
Add pre-commit init-templatedir which makes it easier to
|
||||
automatically enable pre-commit in cloned repositories.
|
||||
pre-commit's color can be controlled using
|
||||
PRE_COMMIT_COLOR={auto,always,never}
|
||||
pre-commit's color can now be disabled using TERM=dumb
|
||||
pre-commit now supports docker based hooks on windows
|
||||
Fix shallow clone
|
||||
Fix autoupdate version flip flop when using shallow cloning
|
||||
Fix autoupdate when the current revision is invalid
|
||||
Replace development instructions with tox --devenv ...
|
||||
Produce better output on ^C
|
||||
Warn on unknown keys at the top level and repo level
|
||||
Fix handling of ^C in wrapper script in python 3.x
|
||||
Fix rmtree for non-writable directories
|
||||
Pass --color option to git diff in --show-diff-on-failure
|
||||
Fix test when pre-commit is installed globally
|
||||
Add support for prepare-commit-msg hook
|
||||
Whitespace fixup
|
||||
Fix cloning non-branch tag while in the fallback slow-clone
|
||||
strategy.
|
||||
- Just switch of tests for now.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 01:11:49 PM UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Initial spec for v1.15.1
|
104
python-pre-commit.spec
Normal file
104
python-pre-commit.spec
Normal file
@@ -0,0 +1,104 @@
|
||||
#
|
||||
# spec file for package python-pre-commit
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define skip_python2 1
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pre-commit
|
||||
Version: 1.20.0
|
||||
Release: 0
|
||||
Summary: Multi-language pre-commit hooks
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/pre-commit/pre-commit
|
||||
Source: https://github.com/pre-commit/pre-commit/archive/v%{version}.tar.gz#/pre_commit-%{version}.tar.gz
|
||||
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-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: python3
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module aspy.yaml}
|
||||
BuildRequires: %{python_module cfgv >= 1.4.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 toml}
|
||||
BuildRequires: %{python_module virtualenv >= 15.2}
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python2-futures
|
||||
BuildRequires: python2-importlib_resources
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
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|#!/usr/bin/python3|' pre_commit/resources/hook-tmpl
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%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
|
||||
# # gh#pre-commit/pre-commit#1202
|
||||
# # test_switch_language_versions_doesnt_clobber - looks like your installation of python2 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)"
|
||||
|
||||
%files %{python_files}
|
||||
%python3_only %{_bindir}/pre-commit-validate-manifest
|
||||
%python3_only %{_bindir}/pre-commit
|
||||
%python3_only %{_bindir}/pre-commit-validate-config
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user