summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-binary-packages.yml76
-rw-r--r--.github/workflows/build-python-package.yml16
-rw-r--r--CHANGELOG.md5
-rw-r--r--Makefile2
-rwxr-xr-xbin/build-binary-dist.sh4
-rw-r--r--debian/changelog5
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules12
-rw-r--r--download/release-3.12.md1
-rw-r--r--gf.cabal2
-rw-r--r--index.html2
-rw-r--r--src/compiler/GF/Interactive2.hs2
-rw-r--r--src/runtime/haskell-bind/pgf2.cabal4
-rw-r--r--src/runtime/python/setup.py4
-rw-r--r--src/server/PGFService.hs4
15 files changed, 80 insertions, 61 deletions
diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml
index d476aa161..bdc62123d 100644
--- a/.github/workflows/build-binary-packages.yml
+++ b/.github/workflows/build-binary-packages.yml
@@ -2,7 +2,7 @@ name: Build Binary Packages
on:
workflow_dispatch:
- release:
+ release:
types: ["created"]
jobs:
@@ -13,9 +13,9 @@ jobs:
name: Build Ubuntu package
strategy:
matrix:
- os:
- - ubuntu-20.04
- - ubuntu-22.04
+ ghc: ["9.6"]
+ cabal: ["3.10"]
+ os: ["ubuntu-24.04"]
runs-on: ${{ matrix.os }}
@@ -25,12 +25,13 @@ jobs:
# Note: `haskell-platform` is listed as requirement in debian/control,
# which is why it's installed using apt instead of the Setup Haskell action.
- # - name: Setup Haskell
- # uses: actions/setup-haskell@v1
- # id: setup-haskell-cabal
- # with:
- # ghc-version: ${{ matrix.ghc }}
- # cabal-version: ${{ matrix.cabal }}
+ - name: Setup Haskell
+ uses: haskell-actions/setup@v2
+ id: setup-haskell-cabal
+ with:
+ ghc-version: ${{ matrix.ghc }}
+ cabal-version: ${{ matrix.cabal }}
+ if: matrix.os == 'ubuntu-24.04'
- name: Install build tools
run: |
@@ -39,14 +40,15 @@ jobs:
make \
dpkg-dev \
debhelper \
- haskell-platform \
libghc-json-dev \
- python-dev \
default-jdk \
- libtool-bin
-
+ python-dev-is-python3 \
+ libtool-bin
+ cabal install alex happy
+
- name: Build package
run: |
+ export PYTHONPATH="/home/runner/work/gf-core/gf-core/debian/gf/usr/local/lib/python3.12/dist-packages/"
make deb
- name: Copy package
@@ -54,7 +56,7 @@ jobs:
cp ../gf_*.deb dist/
- name: Upload artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
path: dist/gf_*.deb
@@ -79,16 +81,16 @@ jobs:
name: Build macOS package
strategy:
matrix:
- ghc: ["8.6.5"]
- cabal: ["2.4"]
- os: ["macos-10.15"]
+ ghc: ["9.6"]
+ cabal: ["3.10"]
+ os: ["macos-latest", "macos-13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Haskell
- uses: actions/setup-haskell@v1
+ uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
@@ -97,8 +99,10 @@ jobs:
- name: Install build tools
run: |
brew install \
- automake
+ automake \
+ libtool
cabal v1-install alex happy
+ pip install setuptools
- name: Build package
run: |
@@ -107,12 +111,12 @@ jobs:
make pkg
- name: Upload artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
- name: gf-${{ github.event.release.tag_name }}-macos
+ name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}
path: dist/gf-*.pkg
if-no-files-found: error
-
+
- name: Rename package
run: |
mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg
@@ -132,9 +136,9 @@ jobs:
name: Build Windows package
strategy:
matrix:
- ghc: ["8.6.5"]
- cabal: ["2.4"]
- os: ["windows-2019"]
+ ghc: ["9.6.7"]
+ cabal: ["3.10"]
+ os: ["windows-2022"]
runs-on: ${{ matrix.os }}
steps:
@@ -147,6 +151,7 @@ jobs:
base-devel
gcc
python-devel
+ autotools
- name: Prepare dist folder
shell: msys2 {0}
@@ -171,7 +176,8 @@ jobs:
- name: Build Java bindings
shell: msys2 {0}
run: |
- export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64
+ echo $JAVA_HOME_8_X64
+ export JDKPATH="$(cygpath -u "${JAVA_HOME_8_X64}")"
export PATH="${PATH}:${JDKPATH}/bin"
cd src/runtime/java
make \
@@ -180,6 +186,9 @@ jobs:
make install
cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll
cp jpgf.jar /c/tmp-dist/java
+ if: false
+
+ # - uses: actions/setup-python@v5
- name: Build Python bindings
shell: msys2 {0}
@@ -188,12 +197,13 @@ jobs:
EXTRA_LIB_DIRS: /mingw64/lib
run: |
cd src/runtime/python
+ pacman --noconfirm -S python-setuptools
python setup.py build
python setup.py install
- cp /usr/lib/python3.9/site-packages/pgf* /c/tmp-dist/python
+ cp -r /usr/lib/python3.12/site-packages/pgf* /c/tmp-dist/python
- name: Setup Haskell
- uses: actions/setup-haskell@v1
+ uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
@@ -205,13 +215,13 @@ jobs:
- name: Build GF
run: |
- cabal install --only-dependencies -fserver
- cabal configure -fserver
+ cabal install --only-dependencies
+ cabal configure
cabal build
- copy dist\build\gf\gf.exe C:\tmp-dist
+ copy dist-newstyle/build/x86_64-windows/ghc-${{matrix.ghc}}/*/x/gf/build/gf/gf.exe C:/tmp-dist
- name: Upload artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: gf-${{ github.event.release.tag_name }}-windows
path: C:\tmp-dist\*
diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml
index d7d8ac94a..b2565eb05 100644
--- a/.github/workflows/build-python-package.yml
+++ b/.github/workflows/build-python-package.yml
@@ -13,10 +13,10 @@ jobs:
strategy:
fail-fast: true
matrix:
- os: [ubuntu-latest, macos-latest]
+ os: [ubuntu-latest, macos-latest, macos-13]
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
@@ -25,7 +25,7 @@ jobs:
- name: Install cibuildwheel
run: |
- python -m pip install git+https://github.com/joerick/cibuildwheel.git@main
+ python -m pip install cibuildwheel
- name: Install build tools for OSX
if: startsWith(matrix.os, 'macos')
@@ -56,9 +56,9 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- - uses: actions/setup-python@v2
+ - uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.10'
@@ -78,7 +78,7 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
@@ -97,6 +97,6 @@ jobs:
- name: Publish
env:
TWINE_USERNAME: __token__
- TWINE_PASSWORD: ${{ secrets.pypi_password }}
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
- (cd ./src/runtime/python && curl -I --fail https://pypi.org/project/$(python setup.py --name)/$(python setup.py --version)/) || twine upload dist/*
+ twine upload --verbose --non-interactive --skip-existing dist/* \ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac209f1af..c27fa1c61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
-### New since 3.11 (WIP)
+### New since 3.12 (WIP)
-- Added a changelog!
+### 3.12
+See <https://www.grammaticalframework.org/download/release-3.12.html>
### 3.11
diff --git a/Makefile b/Makefile
index fc2a38808..2b78f7be2 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ html::
# number to the top of debian/changelog.
# (Tested on Ubuntu 15.04. You need to install dpkg-dev & debhelper.)
deb:
- dpkg-buildpackage -b -uc
+ dpkg-buildpackage -b -uc -d
# Make a macOS installer package
pkg:
diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh
index 4ea1c31a3..4dad03c8b 100755
--- a/bin/build-binary-dist.sh
+++ b/bin/build-binary-dist.sh
@@ -32,7 +32,7 @@ set -x # print commands before executing them
pushd src/runtime/c
bash setup.sh configure --prefix="$prefix"
bash setup.sh build
-bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
+# bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
bash setup.sh install prefix="$destdir$prefix"
popd
@@ -46,7 +46,7 @@ if which >/dev/null python; then
pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p')
pydest="$destdir/Library/Python/$pyver/site-packages"
mkdir -p "$pydest"
- ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest"
+ ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf*.so "$pydest"
fi
popd
else
diff --git a/debian/changelog b/debian/changelog
index e91bf28fb..6c4018287 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+gf (3.12) noble; urgency=low
+
+ * GF 3.12
+
+ -- Inari Listenmaa <inari@digitalgrammars.com> Fri, 8 Aug 2025 18:29:29 +0100
gf (3.11) bionic focal; urgency=low
* GF 3.11
diff --git a/debian/control b/debian/control
index 12eb6b9d9..729d81382 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
Priority: optional
Maintainer: Thomas Hallgren <hallgren@chalmers.se>
Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev, java-sdk
+Build-Depends: debhelper (>= 5), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev-is-python3, java-sdk
Homepage: http://www.grammaticalframework.org/
Package: gf
diff --git a/debian/rules b/debian/rules
index 7ec04b4e2..9969fe56e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ override_dh_shlibdeps:
override_dh_auto_configure:
cd src/runtime/c && bash setup.sh configure --prefix=/usr
cd src/runtime/c && bash setup.sh build
- cabal v1-update
+ cabal update
cabal v1-install --only-dependencies
cabal v1-configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
@@ -24,7 +24,7 @@ SET_LDL=LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs
override_dh_auto_build:
cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build
- cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr
+ # cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr
echo $(SET_LDL)
-$(SET_LDL) cabal v1-build
@@ -32,13 +32,15 @@ override_dh_auto_install:
$(SET_LDL) cabal v1-copy --destdir=$(CURDIR)/debian/gf
cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr
cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr
- cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
- D="`find debian/gf -name site-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv site-packages dist-packages
+ # cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
+ # D="`find debian/gf -name dist-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv dist-packages dist-packages
+
+override_dh_usrlocal:
override_dh_auto_clean:
rm -fr dist/build
-cd src/runtime/python && rm -fr build
- -cd src/runtime/java && make clean
+ # -cd src/runtime/java && make clean
-cd src/runtime/c && make clean
override_dh_auto_test:
diff --git a/download/release-3.12.md b/download/release-3.12.md
index ca3b81b6a..7380fb541 100644
--- a/download/release-3.12.md
+++ b/download/release-3.12.md
@@ -19,6 +19,7 @@ Over 70 commits have been merged to gf-core since the release of GF 3.11 in July
- Better error messages
- Improvements to several GF shell commands
- Several bug fixes and performance improvements
+- Temporarily dropped support for Java bindings
## GF compiler and run-time library
- Syntactic sugar for table update: `table {cases ; vvv => t \! vvv}.t` can now be written as `t ** { cases }`
diff --git a/gf.cabal b/gf.cabal
index 69ea85e1c..4586436f8 100644
--- a/gf.cabal
+++ b/gf.cabal
@@ -1,5 +1,5 @@
name: gf
-version: 3.11.0-git
+version: 3.12.0
cabal-version: 1.22
build-type: Simple
diff --git a/index.html b/index.html
index 57d555e56..dd6e535b1 100644
--- a/index.html
+++ b/index.html
@@ -245,7 +245,7 @@ least one, it may help you to get a first idea of what GF is.
<div class="col-md-6">
<h2>News</h2>
<dl class="row">
- <dt class="col-sm-3 text-center text-nowrap">2025-08-03</dt>
+ <dt class="col-sm-3 text-center text-nowrap">2025-08-08</dt>
<dd class="col-sm-9">
<strong>GF 3.12 released.</strong>
<a href="download/release-3.12.html">Release notes</a>
diff --git a/src/compiler/GF/Interactive2.hs b/src/compiler/GF/Interactive2.hs
index d429b4530..f0c3f6043 100644
--- a/src/compiler/GF/Interactive2.hs
+++ b/src/compiler/GF/Interactive2.hs
@@ -12,7 +12,7 @@ import GF.Command.Abstract
import GF.Command.Parse(readCommandLine,pCommand)
import GF.Data.Operations (Err(..))
import GF.Data.Utilities(whenM,repeatM)
-
+import Control.Monad (join, when, (<=<))
import GF.Infra.UseIO(ioErrorText,putStrLnE)
import GF.Infra.SIO
import GF.Infra.Option
diff --git a/src/runtime/haskell-bind/pgf2.cabal b/src/runtime/haskell-bind/pgf2.cabal
index 83c990bf3..d7a98489e 100644
--- a/src/runtime/haskell-bind/pgf2.cabal
+++ b/src/runtime/haskell-bind/pgf2.cabal
@@ -15,7 +15,7 @@ homepage: https://www.grammaticalframework.org/
bug-reports: https://github.com/GrammaticalFramework/gf-core/issues
author: Krasimir Angelov
extra-source-files: CHANGELOG.md, README.md
-tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4
+tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC=9.6.6
library
exposed-modules:
@@ -26,7 +26,7 @@ library
PGF2.Expr,
PGF2.Type
build-depends:
- base >= 4.9.1 && < 4.16,
+ base >= 4.9.1 && < 4.22,
containers >= 0.5.7 && < 0.7,
pretty >= 1.1.3 && < 1.2
default-language: Haskell2010
diff --git a/src/runtime/python/setup.py b/src/runtime/python/setup.py
index fdc2fe8c5..3a1e6dc5c 100644
--- a/src/runtime/python/setup.py
+++ b/src/runtime/python/setup.py
@@ -1,4 +1,4 @@
-from distutils.core import setup, Extension
+from setuptools import setup, Extension
import os
includes = os.getenv('EXTRA_INCLUDE_DIRS','').split(':')
@@ -16,7 +16,7 @@ pgf_module = Extension('pgf',
libraries = ['gu', 'pgf'])
setup (name = 'pgf',
- version = '1.0',
+ version = '1.1',
description = 'Python bindings to the Grammatical Framework\'s PGF runtime',
long_description="""\
Grammatical Framework (GF) is a programming language for multilingual grammar applications.
diff --git a/src/server/PGFService.hs b/src/server/PGFService.hs
index 6e72ce5ea..fda611fdc 100644
--- a/src/server/PGFService.hs
+++ b/src/server/PGFService.hs
@@ -159,13 +159,13 @@ cpgfMain qsem command (t,(pgf,pc)) =
-> out t=<< bracketedLin # tree % to
"c-linearizeAll"-> out t=<< linAll # tree % to
"c-translate" -> withQSem qsem $
- out t=<<join(trans # input % cat % to % start % limit%treeopts)
+ out t=<<join(trans # input % cat % to % start % limit % treeopts)
"c-lookupmorpho"-> out t=<< morpho # from1 % textInput
"c-lookupcohorts"->out t=<< cohorts # from1 % getInput "filter" % textInput
"c-flush" -> out t=<< flush
"c-grammar" -> out t grammar
"c-abstrtree" -> outputGraphviz=<< C.graphvizAbstractTree pgf C.graphvizDefaults # tree
- "c-parsetree" -> outputGraphviz=<< (\cnc -> C.graphvizParseTree cnc C.graphvizDefaults) . snd # from1 %tree
+ "c-parsetree" -> outputGraphviz=<< (\cnc -> C.graphvizParseTree cnc C.graphvizDefaults) . snd # from1 % tree
"c-wordforword" -> out t =<< wordforword # input % cat % to
_ -> badRequest "Unknown command" command
where