author | Chih-Hsuan Yen
<yan12125@archlinux.org> 2020-10-03 14:15:52 UTC |
committer | Chih-Hsuan Yen
<yan12125@archlinux.org> 2020-10-03 14:15:52 UTC |
parent | fdec41dc2c3d6e4eae98d55ab13a127e26197266 |
PKGBUILD | +17 | -19 |
update-tests-2.diff | +0 | -17 |
diff --git a/PKGBUILD b/PKGBUILD index f2e89ef..435532e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,36 +2,27 @@ # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org> pkgname=nvchecker -pkgver=1.7 +pkgver=2.0 pkgrel=1 pkgdesc="New version checker for software releases" arch=('any') url="https://github.com/lilydjwg/nvchecker" license=('MIT') -depends=('python' 'python-setuptools' 'python-structlog' 'python-tornado' 'python-pycurl') -checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-httpbin' 'python-flaky' 'git' 'mercurial') +# setuptools is in depends as pkg_resources is used in sortversion.py +depends=('python' 'python-setuptools' 'python-toml' 'python-structlog' 'python-appdirs' 'python-tornado' 'python-pycurl') +checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-httpbin' 'python-flaky' 'git') optdepends=( 'pyalpm: allow using "sort_version_key = vercmp" in configuration files' - 'bzr: for VCS sources' - 'git: for VCS sources' - 'mercurial: for VCS sources' - 'subversion: for VCS sources' + 'git: support for git repositories' ) -# Indices for patches should never be reused! Last index = 7 -source=("$pkgname-$pkgver.tar.gz::https://github.com/lilydjwg/nvchecker/archive/v$pkgver/$pkgname-$pkgver.tar.gz" - "$pkgname-update-tests-5.patch::https://github.com/lilydjwg/nvchecker/commit/44687da8a6f4e3bdeb18baf1132518b17bddd484.patch" - "$pkgname-update-tests-6.patch::https://github.com/lilydjwg/nvchecker/commit/3a6746ed2447bf2d9c3e7d79a5cfe59571582068.patch" - "$pkgname-update-tests-7.patch::https://github.com/lilydjwg/nvchecker/commit/b5067de68c562ab2bccdba0c73edc0c0992e49ee.patch") -sha512sums=('6243960747de33bd004bb3377109699f702bb64d65320e0c219f540546f33ace2d87be4eb2b18d988874eb98812176488fa5c98aec6f93cd218b8549b38482d0' - '24d14870de13bbb2beec128854cfb04a65e3fee7720f62856c4c20afadf83975b0d3e26888a96f3663218556ddd0e173831b4c9c89305cacf8f94e531025d0e0' - '56e1f12b73f484a93ce7e9c2a6b2bc6cbd0c3b4fd25c9fc5a4190d6feaf38457fa36b5eb1e1ad107f278ccb7df7811f71285ddf98cd486f58fa8adbd7ff40eda' - '46e08b877e807fb010c0cc5aa8c1cf3642ec64d3078a31e8567fa1dbb17f4caf352d952c6acf0ed67593b63446b22e3a174a297478bb0ea33b5aea46596b2b64') +source=("https://github.com/lilydjwg/nvchecker/archive/v$pkgver/$pkgname-$pkgver.tar.gz" + "$pkgname-exclude-docs.patch::https://github.com/lilydjwg/nvchecker/commit/b3bc7ec04975ab43a651b78cd708e8c32f974293.patch") +sha512sums=('1ae9b52c01ac683e5f74d9a10b7b26d5bad62b54a905f9372afea31fc084f4ff6e426a01634b0ff040270d1dff256f8385426bfe470d434a7f694446f1656ebb' + 'f6a131501d3249e6de23b345d9be70dc7209a638af50bcb9c4e5928f9d19ef85e377bdc6ca97dcc90cc868859f9bfc35c8e3a6cd1abf9f5c022e894119d6cb32') prepare() { cd nvchecker-$pkgver - patch -Np1 -i ../$pkgname-update-tests-5.patch - patch -Np1 -i ../$pkgname-update-tests-6.patch - patch -Np1 -i ../$pkgname-update-tests-7.patch + patch -Np1 -i ../$pkgname-exclude-docs.patch } build() { @@ -49,6 +40,13 @@ package() { # use PYTHONHASHSEED=0 work around https://bugs.python.org/issue34722 PYTHONHASHSEED=0 python setup.py install --root="$pkgdir" --optimize=1 --skip-build install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname + + # bash completion scripts & docs + install -Dm644 scripts/nvtake.bash_completion "$pkgdir"/usr/share/bash-completion/completions/nvtake + install -Dm644 docs/usage.rst -t "$pkgdir"/usr/share/doc/$pkgname/ + # Installed with a different filename as it is renamed soon after the release + # https://github.com/lilydjwg/nvchecker/commit/854399a30aaafed37bdfcf2c8fe561f4702124b7 + install -Dm644 sample_source.toml "$pkgdir"/usr/share/doc/$pkgname/sample_config.toml } # vim:set ts=2 sw=2 et: diff --git a/update-tests-2.diff b/update-tests-2.diff deleted file mode 100644 index 5e1f3f5..0000000 --- a/update-tests-2.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/tests/test_vcs.py b/tests/test_vcs.py -index 4e8061e..c9cf71e 100644 ---- a/tests/test_vcs.py -+++ b/tests/test_vcs.py -@@ -13,12 +13,6 @@ async def test_git(get_version): - os.path.exists("example") or os.mkdir("example") - assert await get_version("example", {"vcs": "git+https://github.com/harry-sanabria/ReleaseTestRepo.git"}) == "1.1.2b3cdf6134b07ae6ac77f11b586dc1ae6d1521db" - --@pytest.mark.skipif(shutil.which("hg") is None, -- reason="requires hg command") --async def test_mercurial(get_version): -- os.path.exists("example") or os.mkdir("example") -- assert await get_version("example", {"vcs": "hg+https://bitbucket.org/pil0t/testrepo"}) == "1.1.84679e29c7d9" -- - @pytest.mark.skipif(shutil.which("git") is None, - reason="requires git command") - async def test_git_max_tag(get_version):