From ccf3aa7169d442280cdf499178b37aac470d0f22 Mon Sep 17 00:00:00 2001 From: Roland Kaminski Date: Wed, 12 May 2021 17:06:45 +0200 Subject: [PATCH] fix application --- .github/conda/meta.yaml | 4 +++- .github/deploy.yml | 4 +++- telingo/__init__.py | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/conda/meta.yaml b/.github/conda/meta.yaml index 087967b..d561b6b 100644 --- a/.github/conda/meta.yaml +++ b/.github/conda/meta.yaml @@ -23,7 +23,9 @@ requirements: build: number: {{ build }} noarch: python - script: python -m pip install --no-deps --ignore-installed . + script: python setup.py install --single-version-externally-managed --record record.txt + entry_points: + - telingo = telingo:main about: diff --git a/.github/deploy.yml b/.github/deploy.yml index e0fc66c..8a3ba83 100644 --- a/.github/deploy.yml +++ b/.github/deploy.yml @@ -44,7 +44,9 @@ conda: - clingo >=5.5.0 build: noarch: python - script: 'python -m pip install --no-deps --ignore-installed .' + script: 'python setup.py install --single-version-externally-managed --record record.txt' + entry_points: + - telingo = telingo:main about: home: https://potassco.org/ license: MIT diff --git a/telingo/__init__.py b/telingo/__init__.py index 29f3933..7e7b21f 100644 --- a/telingo/__init__.py +++ b/telingo/__init__.py @@ -15,6 +15,7 @@ import sys as _sys import clingo as _clingo +import clingo.ast as _ast import textwrap as _textwrap def imain(prg, future_sigs, program_parts, on_model, imin = 0, imax = None, istop = "SAT"): @@ -85,7 +86,7 @@ def __init__(self): See clingo.clingo_main(). """ self.program_name = "telingo" - self.version = "2.1.0" + self.version = "2.1.1" self.__imin = 0 self.__imax = None @@ -163,7 +164,7 @@ def main(self, prg, files): This function implements the Application.main() function as required by clingo.clingo_main(). """ - with prg.builder() as b: + with _ast.ProgramBuilder(prg) as b: files = [open(f) for f in files] if len(files) == 0: files.append(_sys.stdin)