Commit 6a89266d authored by Sören Tempel's avatar Sören Tempel

testing/hy: upgrade to 0.19.0

parent a6280ac6
From 5e06a5b38d9a3026589ea11cc4c64bddd9a88ef3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 17 May 2020 16:48:13 +0200
Subject: [PATCH] get_version.py: Also write VERSIONFILE when HY_VERSION env is
set
Without this change, hy is not capable of figuring out the correct
version in the REPL if the version was set using the HY_VERSION
environment variable during build.
---
get_version.py | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/get_version.py b/get_version.py
index 9224f59..c6af6db 100644
--- a/get_version.py
+++ b/get_version.py
@@ -5,19 +5,20 @@ import os, subprocess, runpy
os.chdir(os.path.split(os.path.abspath(__file__))[0])
VERSIONFILE = os.path.join("hy", "version.py")
-if "HY_VERSION" in os.environ:
- __version__ = os.environ["HY_VERSION"]
-else:
- try:
+try:
+ if "HY_VERSION" in os.environ:
+ __version__ = os.environ["HY_VERSION"]
+ else:
__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"
+ 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"
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=hy
pkgver=0.18.0
pkgrel=3
pkgver=0.19.0
pkgrel=0
pkgdesc="Dialect of Lisp that's embedded in Python"
url="http://hylang.org/"
arch="noarch"
......@@ -11,8 +11,7 @@ depends="python3 py3-funcparserlib py3-astor py3-rply py3-colorama"
makedepends="py3-setuptools py3-sphinx py3-sphinx_rtd_theme"
checkdepends="python3-tests py3-pytest py3-pytest-runner py3-tox"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hylang/hy/archive/$pkgver.tar.gz
0001-get_version.py-Also-write-VERSIONFILE-when-HY_VERSIO.patch"
source="$pkgname-$pkgver.tar.gz::https://github.com/hylang/hy/archive/$pkgver.tar.gz"
# By default setup.py tries to determine the hy version using
# git-describe(1). Unfourtunatly, this will return the version
......@@ -44,5 +43,4 @@ package() {
rm -rf "$pkgdir"/usr/get_version
}
sha512sums="ff578eb6ca70f82492b37bfcc41167e8f8d50337bbdd6b049edb654163b60156a65933aa723ea357fee0f84dc25837d70bd00251760fa2b00f599088e592d97c hy-0.18.0.tar.gz
fa5c7cd7727a878020e683528a4cd358dc114263a9c65fdb178afd0be9ce5f67b1ff3209fe71f5c36e325c0ce7eac54f2fbe1a2fc647f800f9183edf73b6cc1e 0001-get_version.py-Also-write-VERSIONFILE-when-HY_VERSIO.patch"
sha512sums="4ceb85865b4f09072df180c43422570f05599cdaa4a5f456b5b4ad5d2381b9065a99bbd1e787c0911b35916e7f0c04a74a959c12c3dd61c3dee0415643de7afc hy-0.19.0.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment