diff options
| author | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-08-25 12:12:47 +0200 |
|---|---|---|
| committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2019-09-21 13:28:42 +0200 |
| commit | 7e9f0fa784d3fbbeb82cb0202a08fdc76a03aa54 (patch) | |
| tree | a1a44694953b91c14230db6fde07bd6c6e8c8b78 /testing | |
| parent | 7a7155f7da9181e8d119268ca57b9e04448a3dca (diff) | |
| download | aports-7e9f0fa784d3fbbeb82cb0202a08fdc76a03aa54.tar.bz2 aports-7e9f0fa784d3fbbeb82cb0202a08fdc76a03aa54.tar.xz | |
testing/hy: new aport
Diffstat (limited to 'testing')
| -rw-r--r-- | testing/hy/APKBUILD | 37 | ||||
| -rw-r--r-- | testing/hy/do-not-invoke-git-describe.patch | 29 |
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/hy/APKBUILD b/testing/hy/APKBUILD new file mode 100644 index 0000000000..dd12eb5c7f --- /dev/null +++ b/testing/hy/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net> +pkgname=hy +pkgver=0.17.0 +pkgrel=0 +pkgdesc="Dialect of Lisp that's embedded in Python" +url="http://hylang.org/" +arch="all" +license="MIT" +depends="python3 py3-funcparserlib py3-astor py3-rply py3-clint" +makedepends="py3-setuptools" +checkdepends="python3-tests py3-pytest py3-pytest-runner py3-setuptools py3-tox" +source="$pkgname-$pkgver.tar.gz::https://github.com/hylang/$pkgname/archive/$pkgver.tar.gz + do-not-invoke-git-describe.patch" + +prepare() { + default_prepare + echo "__version__ = '$pkgver'" > "$builddir"/hy/version.py +} + +build() { + python3 setup.py build +} + +check() { + # Ignore tests requiring binaries to be installed + py.test-3 --ignore tests/test_bin.py \ + --ignore tests/test_hy2py.py +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" + rm -rf "$pkgdir"/usr/get_version +} + +sha512sums="18601bf47df2120f8833a1ae211c416dc90825f31cd50b259adfe0585089a623d0fea13512b2935b093e14d8595c93bc1610939d5f1d664f6acf7ddf7e341542 hy-0.17.0.tar.gz +75256a4f35f97b71abc0bf111bfd6c7d7a4173dde346fb293eceecbc8fe3c550c00265625663f446771b8336711e8821da1179dc32da32d10c85a802d190efff do-not-invoke-git-describe.patch" diff --git a/testing/hy/do-not-invoke-git-describe.patch b/testing/hy/do-not-invoke-git-describe.patch new file mode 100644 index 0000000000..6cf2751709 --- /dev/null +++ b/testing/hy/do-not-invoke-git-describe.patch @@ -0,0 +1,29 @@ +Upstream only uses the version from the VERSIONFILE if git-describe(1) +fails. Unfourtunatly, git is installed on the builders and therefore the +invocation won't fail. Patch it to not invoke git at all and always use +the VERSIONFILE. + +diff -urp hy-0.17.0.orig/get_version.py hy-0.17.0/get_version.py +--- hy-0.17.0.orig/get_version.py 2019-08-25 12:19:03.420044611 +0200 ++++ hy-0.17.0/get_version.py 2019-08-25 12:19:12.650057246 +0200 +@@ -5,16 +5,7 @@ import os, subprocess, runpy + os.chdir(os.path.split(os.path.abspath(__file__))[0]) + VERSIONFILE = os.path.join("hy", "version.py") + +-try: +- __version__ = (subprocess.check_output +- (["git", "describe", "--tags", "--dirty"]) +- .decode('ASCII').strip() +- .replace('-', '+', 1).replace('-', '.')) +- with open(VERSIONFILE, "wt") as o: +- o.write("__version__ = {!r}\n".format(__version__)) +- +-except (subprocess.CalledProcessError, OSError): +- if os.path.exists(VERSIONFILE): +- __version__ = runpy.run_path(VERSIONFILE)['__version__'] +- else: +- __version__ = "unknown" ++if os.path.exists(VERSIONFILE): ++ __version__ = runpy.run_path(VERSIONFILE)['__version__'] ++else: ++ __version__ = "unknown" |
