Skip to content

Commit

Permalink
Fix antlr4 runtime version (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
daskol authored Feb 22, 2023
1 parent e7bb027 commit 9040b99
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
9 changes: 6 additions & 3 deletions python-hydra-core/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
pkgbase = python-hydra-core
pkgdesc = A framework for elegantly configuring complex applications
pkgver = 1.2.0
pkgver = 1.3.1
pkgrel = 1
url = https://hydra.cc
arch = any
license = MIT
makedepends = antlr4
makedepends = python
makedepends = python-build
makedepends = python-installer
Expand All @@ -14,7 +15,9 @@ pkgbase = python-hydra-core
depends = python-omegaconf
depends = python-antlr4
depends = java-environment
source = python-hydra-core-1.2.0::https://github.com/facebookresearch/hydra/archive/refs/tags/v1.2.0.tar.gz
sha256sums = 19b203fc614426cd6e4bb7c51e73a25a1ceb4606450ec0203345aec67a0a4f6a
source = python-hydra-core-1.3.1::https://github.com/facebookresearch/hydra/archive/refs/tags/v1.3.1.tar.gz
source = antlr4-jar.patch
sha256sums = 9ba1efe09893853e883498fcbeec17f2a77e1ba551587d6d0604077e02de1602
sha256sums = 9db3a15d9c32cc754d19efbe0065025612ed6cd0d68d948ccebd5dc6544aadc6

pkgname = python-hydra-core
15 changes: 11 additions & 4 deletions python-hydra-core/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@
# Contributor: Andrei Shadrikov <[email protected]>

pkgname='python-hydra-core'
pkgver='1.2.0'
pkgver='1.3.1'
pkgrel=1
pkgdesc='A framework for elegantly configuring complex applications'
arch=('any')
url='https://hydra.cc'
license=('MIT')
depends=('python-omegaconf' 'python-antlr4' 'java-environment')
makedepends=('python' 'python-build' 'python-installer' 'python-wheel'
makedepends=('antlr4' 'java-runtime>=11', 'python' 'python-build' 'python-installer' 'python-wheel'
'python-setuptools' 'python-packaging')
source=("$pkgname-$pkgver::https://github.com/facebookresearch/hydra/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('19b203fc614426cd6e4bb7c51e73a25a1ceb4606450ec0203345aec67a0a4f6a')
source=("$pkgname-$pkgver::https://github.com/facebookresearch/hydra/archive/refs/tags/v${pkgver}.tar.gz"
"antlr4-jar.patch")
sha256sums=('9ba1efe09893853e883498fcbeec17f2a77e1ba551587d6d0604077e02de1602'
'9db3a15d9c32cc754d19efbe0065025612ed6cd0d68d948ccebd5dc6544aadc6')

_pkgname=hydra

prepare() {
pwd
patch -p1 -d "$_pkgname-$pkgver" < antlr4-jar.patch
}

build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python -m build --wheel --no-isolation
Expand Down
13 changes: 13 additions & 0 deletions python-hydra-core/antlr4-jar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/build_helpers/build_helpers.py b/build_helpers/build_helpers.py
index 7159d22615..8401fee3b7 100644
--- a/build_helpers/build_helpers.py
+++ b/build_helpers/build_helpers.py
@@ -185,7 +185,7 @@ class ANTLRCommand(Command): # type: ignore
command = [
"java",
"-jar",
- join(root_dir, "bin/antlr-4.9.3-complete.jar"),
+ "/usr/share/java/antlr-complete.jar",
"-Dlanguage=Python3",
"-o",
join(project_root, "hydra/grammar/gen/"),

0 comments on commit 9040b99

Please sign in to comment.