Skip to content

Commit dcae5f9

Browse files
committed
fix typo
2 parents 638ed39 + 726fb34 commit dcae5f9

File tree

13 files changed

+91
-48
lines changed

13 files changed

+91
-48
lines changed

.github/workflows/build-binary-packages.yml

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build Binary Packages
22

33
on:
44
workflow_dispatch:
5-
release:
5+
release:
66
types: ["created"]
77

88
jobs:
@@ -13,9 +13,9 @@ jobs:
1313
name: Build Ubuntu package
1414
strategy:
1515
matrix:
16-
os:
17-
- ubuntu-20.04
18-
- ubuntu-22.04
16+
ghc: ["9.6"]
17+
cabal: ["3.10"]
18+
os: ["ubuntu-24.04"]
1919

2020
runs-on: ${{ matrix.os }}
2121

@@ -25,12 +25,13 @@ jobs:
2525
# Note: `haskell-platform` is listed as requirement in debian/control,
2626
# which is why it's installed using apt instead of the Setup Haskell action.
2727

28-
# - name: Setup Haskell
29-
# uses: actions/setup-haskell@v1
30-
# id: setup-haskell-cabal
31-
# with:
32-
# ghc-version: ${{ matrix.ghc }}
33-
# cabal-version: ${{ matrix.cabal }}
28+
- name: Setup Haskell
29+
uses: haskell-actions/setup@v2
30+
id: setup-haskell-cabal
31+
with:
32+
ghc-version: ${{ matrix.ghc }}
33+
cabal-version: ${{ matrix.cabal }}
34+
if: matrix.os == 'ubuntu-24.04'
3435

3536
- name: Install build tools
3637
run: |
@@ -39,22 +40,23 @@ jobs:
3940
make \
4041
dpkg-dev \
4142
debhelper \
42-
haskell-platform \
4343
libghc-json-dev \
44-
python-dev \
4544
default-jdk \
46-
libtool-bin
47-
45+
python-dev-is-python3 \
46+
libtool-bin
47+
cabal install alex happy
48+
4849
- name: Build package
4950
run: |
51+
export PYTHONPATH="/home/runner/work/gf-core/gf-core/debian/gf/usr/local/lib/python3.12/dist-packages/"
5052
make deb
5153
5254
- name: Copy package
5355
run: |
5456
cp ../gf_*.deb dist/
5557
5658
- name: Upload artifact
57-
uses: actions/upload-artifact@v2
59+
uses: actions/upload-artifact@v4
5860
with:
5961
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
6062
path: dist/gf_*.deb
@@ -79,16 +81,16 @@ jobs:
7981
name: Build macOS package
8082
strategy:
8183
matrix:
82-
ghc: ["8.6.5"]
83-
cabal: ["2.4"]
84-
os: ["macos-10.15"]
84+
ghc: ["9.6"]
85+
cabal: ["3.10"]
86+
os: ["macos-latest", "macos-13"]
8587
runs-on: ${{ matrix.os }}
8688

8789
steps:
8890
- uses: actions/checkout@v2
8991

9092
- name: Setup Haskell
91-
uses: actions/setup-haskell@v1
93+
uses: haskell-actions/setup@v2
9294
id: setup-haskell-cabal
9395
with:
9496
ghc-version: ${{ matrix.ghc }}
@@ -97,8 +99,10 @@ jobs:
9799
- name: Install build tools
98100
run: |
99101
brew install \
100-
automake
102+
automake \
103+
libtool
101104
cabal v1-install alex happy
105+
pip install setuptools
102106
103107
- name: Build package
104108
run: |
@@ -107,12 +111,12 @@ jobs:
107111
make pkg
108112
109113
- name: Upload artifact
110-
uses: actions/upload-artifact@v2
114+
uses: actions/upload-artifact@v4
111115
with:
112-
name: gf-${{ github.event.release.tag_name }}-macos
116+
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}
113117
path: dist/gf-*.pkg
114118
if-no-files-found: error
115-
119+
116120
- name: Rename package
117121
run: |
118122
mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg
@@ -132,9 +136,9 @@ jobs:
132136
name: Build Windows package
133137
strategy:
134138
matrix:
135-
ghc: ["8.6.5"]
136-
cabal: ["2.4"]
137-
os: ["windows-2019"]
139+
ghc: ["9.6.7"]
140+
cabal: ["3.10"]
141+
os: ["windows-2022"]
138142
runs-on: ${{ matrix.os }}
139143

140144
steps:
@@ -147,6 +151,7 @@ jobs:
147151
base-devel
148152
gcc
149153
python-devel
154+
autotools
150155
151156
- name: Prepare dist folder
152157
shell: msys2 {0}
@@ -171,7 +176,8 @@ jobs:
171176
- name: Build Java bindings
172177
shell: msys2 {0}
173178
run: |
174-
export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64
179+
echo $JAVA_HOME_8_X64
180+
export JDKPATH="$(cygpath -u "${JAVA_HOME_8_X64}")"
175181
export PATH="${PATH}:${JDKPATH}/bin"
176182
cd src/runtime/java
177183
make \
@@ -180,6 +186,9 @@ jobs:
180186
make install
181187
cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll
182188
cp jpgf.jar /c/tmp-dist/java
189+
if: false
190+
191+
# - uses: actions/setup-python@v5
183192

184193
- name: Build Python bindings
185194
shell: msys2 {0}
@@ -188,12 +197,13 @@ jobs:
188197
EXTRA_LIB_DIRS: /mingw64/lib
189198
run: |
190199
cd src/runtime/python
200+
pacman --noconfirm -S python-setuptools
191201
python setup.py build
192202
python setup.py install
193-
cp /usr/lib/python3.9/site-packages/pgf* /c/tmp-dist/python
203+
cp -r /usr/lib/python3.12/site-packages/pgf* /c/tmp-dist/python
194204
195205
- name: Setup Haskell
196-
uses: actions/setup-haskell@v1
206+
uses: haskell-actions/setup@v2
197207
id: setup-haskell-cabal
198208
with:
199209
ghc-version: ${{ matrix.ghc }}
@@ -205,13 +215,13 @@ jobs:
205215
206216
- name: Build GF
207217
run: |
208-
cabal install --only-dependencies -fserver
209-
cabal configure -fserver
218+
cabal install --only-dependencies
219+
cabal configure
210220
cabal build
211-
copy dist\build\gf\gf.exe C:\tmp-dist
221+
copy dist-newstyle/build/x86_64-windows/ghc-${{matrix.ghc}}/*/x/gf/build/gf/gf.exe C:/tmp-dist
212222
213223
- name: Upload artifact
214-
uses: actions/upload-artifact@v2
224+
uses: actions/upload-artifact@v4
215225
with:
216226
name: gf-${{ github.event.release.tag_name }}-windows
217227
path: C:\tmp-dist\*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ html::
5050
# number to the top of debian/changelog.
5151
# (Tested on Ubuntu 15.04. You need to install dpkg-dev & debhelper.)
5252
deb:
53-
dpkg-buildpackage -b -uc
53+
dpkg-buildpackage -b -uc -d
5454

5555
# Make a macOS installer package
5656
pkg:

bin/build-binary-dist.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ set -x # print commands before executing them
3232
pushd src/runtime/c
3333
bash setup.sh configure --prefix="$prefix"
3434
bash setup.sh build
35-
bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
35+
# bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
3636
bash setup.sh install prefix="$destdir$prefix"
3737
popd
3838

@@ -46,7 +46,7 @@ if which >/dev/null python; then
4646
pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p')
4747
pydest="$destdir/Library/Python/$pyver/site-packages"
4848
mkdir -p "$pydest"
49-
ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest"
49+
ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf*.so "$pydest"
5050
fi
5151
popd
5252
else

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: devel
33
Priority: optional
44
Maintainer: Thomas Hallgren <[email protected]>
55
Standards-Version: 3.9.2
6-
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
6+
Build-Depends: debhelper (>= 5), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev-is-python3, java-sdk
77
Homepage: http://www.grammaticalframework.org/
88

99
Package: gf

debian/rules

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,31 @@ override_dh_shlibdeps:
1616
override_dh_auto_configure:
1717
cd src/runtime/c && bash setup.sh configure --prefix=/usr
1818
cd src/runtime/c && bash setup.sh build
19-
cabal v1-update
19+
cabal update
2020
cabal v1-install --only-dependencies
2121
cabal v1-configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
2222

2323
SET_LDL=LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs
2424

2525
override_dh_auto_build:
2626
cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build
27-
cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr
27+
# cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr
2828
echo $(SET_LDL)
2929
-$(SET_LDL) cabal v1-build
3030

3131
override_dh_auto_install:
3232
$(SET_LDL) cabal v1-copy --destdir=$(CURDIR)/debian/gf
3333
cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr
3434
cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr
35-
cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
36-
D="`find debian/gf -name site-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv site-packages dist-packages
35+
# cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
36+
# D="`find debian/gf -name dist-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv dist-packages dist-packages
37+
38+
override_dh_usrlocal:
3739

3840
override_dh_auto_clean:
3941
rm -fr dist/build
4042
-cd src/runtime/python && rm -fr build
41-
-cd src/runtime/java && make clean
43+
# -cd src/runtime/java && make clean
4244
-cd src/runtime/c && make clean
4345

4446
override_dh_auto_test:

src/compiler/GF/Interactive2.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import GF.Command.Abstract
1212
import GF.Command.Parse(readCommandLine,pCommand)
1313
import GF.Data.Operations (Err(..))
1414
import GF.Data.Utilities(whenM,repeatM)
15-
15+
import Control.Monad (join, when, (<=<))
1616
import GF.Infra.UseIO(ioErrorText,putStrLnE)
1717
import GF.Infra.SIO
1818
import GF.Infra.Option

src/runtime/haskell-bind/pgf2.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ homepage: https://www.grammaticalframework.org/
1515
bug-reports: https://github.com/GrammaticalFramework/gf-core/issues
1616
author: Krasimir Angelov
1717
extra-source-files: CHANGELOG.md, README.md
18-
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4
18+
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC=9.6.6
1919

2020
library
2121
exposed-modules:
@@ -26,7 +26,7 @@ library
2626
PGF2.Expr,
2727
PGF2.Type
2828
build-depends:
29-
base >= 4.9.1 && < 4.16,
29+
base >= 4.9.1 && < 4.22,
3030
containers >= 0.5.7 && < 0.7,
3131
pretty >= 1.1.3 && < 1.2
3232
default-language: Haskell2010
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Metadata-Version: 2.4
2+
Name: pgf
3+
Version: 1.0
4+
Summary: Python bindings to the Grammatical Framework's PGF runtime
5+
Home-page: https://www.grammaticalframework.org/
6+
Author: Krasimir Angelov
7+
Author-email: [email protected]
8+
License: BSD
9+
Dynamic: author
10+
Dynamic: author-email
11+
Dynamic: description
12+
Dynamic: home-page
13+
Dynamic: license
14+
Dynamic: summary
15+
16+
Grammatical Framework (GF) is a programming language for multilingual grammar applications.
17+
This package provides Python bindings to GF runtime, which allows you to parse and generate text using GF grammars compiled into the PGF format.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
INSTALL
2+
README.org
3+
pypgf.c
4+
setup.py
5+
test.py
6+
examples/README
7+
examples/gf_utils.py
8+
examples/translation_pipeline.py
9+
pgf.egg-info/PKG-INFO
10+
pgf.egg-info/SOURCES.txt
11+
pgf.egg-info/dependency_links.txt
12+
pgf.egg-info/top_level.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)