From 4c33316a5795e7fac253aa09d1cedcba5cccb60f Mon Sep 17 00:00:00 2001 From: Keith Maxwell Date: Mon, 13 May 2019 10:15:58 +0100 Subject: testing/vint: new aport Closes GH-7859 --- testing/vint/01-python3-shebang.patch | 8 ++++++++ testing/vint/02-latest-py3-yaml.patch | 18 ++++++++++++++++++ testing/vint/APKBUILD | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 testing/vint/01-python3-shebang.patch create mode 100644 testing/vint/02-latest-py3-yaml.patch create mode 100644 testing/vint/APKBUILD (limited to 'testing') diff --git a/testing/vint/01-python3-shebang.patch b/testing/vint/01-python3-shebang.patch new file mode 100644 index 00000000000..c642296321d --- /dev/null +++ b/testing/vint/01-python3-shebang.patch @@ -0,0 +1,8 @@ +--- a/bin/vint ++++ b/bin/vint +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import sys + from pathlib import Path diff --git a/testing/vint/02-latest-py3-yaml.patch b/testing/vint/02-latest-py3-yaml.patch new file mode 100644 index 00000000000..f641d3682a6 --- /dev/null +++ b/testing/vint/02-latest-py3-yaml.patch @@ -0,0 +1,18 @@ +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,3 +1,3 @@ +-PyYAML ~= 3.11 ++PyYAML + ansicolor ~= 0.2.4 + chardet >= 2.3.0 +--- a/vint/linting/config/config_file_source.py ++++ b/vint/linting/config/config_file_source.py +@@ -10,7 +10,7 @@ + config_file_path = self.get_file_path(env) + + with config_file_path.open() as file_obj: +- self._config_dict = self.convert_config_dict(yaml.load(file_obj)) ++ self._config_dict = self.convert_config_dict(yaml.full_load(file_obj)) + + + def convert_config_dict(self, yaml_dict): diff --git a/testing/vint/APKBUILD b/testing/vint/APKBUILD new file mode 100644 index 00000000000..3ba48d9fe5f --- /dev/null +++ b/testing/vint/APKBUILD @@ -0,0 +1,32 @@ +# Contributor: Keith Maxwell +# Maintainer: Keith Maxwell +pkgname=vint +pkgver=0.3.19 +pkgrel=0 +pkgdesc="Fast and Highly Extensible Vim script Language Lint" +url="https://github.com/Kuniwak/vint" +arch="noarch" +license="MIT" +depends="python3 py3-yaml py3-chardet py3-ansicolor py3-setuptools" +checkdepends="py3-pytest py3-pytest-cov py3-coverage" +# no tests in artifact on PyPI +source="$pkgname-$pkgver.tar.gz::https://github.com/Kuniwak/$pkgname/archive/v$pkgver.tar.gz + 01-python3-shebang.patch + 02-latest-py3-yaml.patch + " + +build() { + python3 setup.py build +} + +check() { + python3 -m pytest +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="b9024ed1cd8a18a916798e691ba0db31985034b2420e33c094459a48254c7c8f6fe89a1a64858a67ff95b0b48e67a780cf975940646af2685d2b95640e8121f9 vint-0.3.19.tar.gz +e777c74ffc16964848f22f051281a284fa05774bd7be9417ea5ad033ea9bc264687df10151e08bf5d319aa7168481e5dd8e3366a942af4fe739ef64511268fa4 01-python3-shebang.patch +c167bd9a1a455ea7d6344eb08448f97cadafec7886cabee42b032b8daf20c2ff85e0c5b87cd72b747213859b6d31d2b33d0fa7147f83facd05fe50ac9d35f971 02-latest-py3-yaml.patch" -- cgit v1.2.3