Skip to content

Commit

Permalink
fix application
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed May 12, 2021
1 parent 8c1b98c commit ccf3aa7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion .github/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions telingo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ccf3aa7

Please sign in to comment.