Skip to content

Commit

Permalink
modernize project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Feb 22, 2018
1 parent c871fd1 commit c0fa62d
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 97 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
*-c
*.egg-info
dist
build
.env*
.ropeproject
.cache
.python-version
.tox
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: python
python:
- "pypy2.7-5.10.0"
- "pypy3.5-5.10.1"
- "2.7"
- "3.4"
- "3.6"
- "3.5"
- "pypy"
- "pypy3"
- "3.4"
- "nightly"
# command to install dependencies
install:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ test:
cd snippets && AHEUI="../rpaheui-c" bash test.sh

testpy:
py.test
pytest
if [ -e snippets ]; then cd snippets && git pull; else git clone https://github.com/aheui/snippets; fi
cd snippets && AHEUI=../rpaheui.py bash test.sh
1 change: 1 addition & 0 deletions aheui/_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def parse_args(self, args):
os.write(2, '%s: error: %s\n' % (prog, e.message()))
return {}, []


parser = ArgumentParser(prog='aheui')
parser.add_argument('--opt', '-O', default='2', choices='0,1,2', description='Set optimization level.', full_description="""\t0: No optimization.
\t1: Quickly resolve deadcode by rough stacksize emulation and merge constant operations.
Expand Down
2 changes: 2 additions & 0 deletions aheui/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ def sort(self):
ord = ord
except NameError:
long = int

def unichr(n): # not rpython but python3
return chr(n)

ord3 = ord

def ord(n):
Expand Down
1 change: 1 addition & 0 deletions aheui/aheui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def get_location(pc, stackok, is_queue, program):
val = ('_%d' % program.get_operand(pc)) if compile.OP_USEVAL[op] else ''
return "#%d(s%dq%d)_%s%s" % (pc, stackok, is_queue, compile.OP_NAMES[op].encode('utf-8'), val)


driver = jit.JitDriver(
greens=['pc', 'stackok', 'is_queue', 'program'],
reds=['stacksize', 'storage', 'selected'],
Expand Down
Loading

0 comments on commit c0fa62d

Please sign in to comment.