Skip to content

Commit

Permalink
drop special jython support from build.py
Browse files Browse the repository at this point in the history
To test with jython run `tox -e jython` or `TOXENV=jython python build.py test`.
  • Loading branch information
Changaco committed Jul 30, 2016
1 parent 7dea4de commit 243a73f
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,45 +228,6 @@ def clean_build():
run('python', 'setup.py', 'clean', '-a')
run('rm', '-rf', 'dist')

# Jython
# ======
JYTHON_URL = "http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b1/jython-installer-2.7-b1.jar"

def _jython_home():
if not os.path.exists('jython_home'):
local_jython = 'jython-installer.jar'
run('wget', JYTHON_URL, '-qO', local_jython)
run('java', '-jar', local_jython, '-s', '-d', 'jython_home')

def _jenv():
_jython_home()
jenv = dict(os.environ)
jenv['PATH'] = os.path.join('.', 'jython_home', 'bin') + ':' + jenv['PATH']
args = [ 'jython' ] + ENV_ARGS + [ '--python=jython', 'jenv' ]
run(*args, env=jenv)

def clean_jenv():
"""clean up the jython environment"""
shell('find', '.', '-name', '*.class', '-delete')
shell('rm', '-rf', 'jenv', 'jython_home')

def jython_test():
"""install jython and run tests with coverage (requires java)"""
_jenv()
run(_virt('pip', 'jenv'), 'install', *TEST_DEPS)
run(_virt('jython', 'jenv'), 'setup.py', 'develop')
run(_virt('jython', 'jenv'), _virt('py.test', 'jenv'),
'--junitxml=jython-testresults.xml', 'tests',
'--cov-report', 'term',
'--cov-report', 'xml',
'--cov', 'aspen',
ignore_status=True)

def clean_jtest():
"""clean jython test results"""
shell('find', '.', '-name', '*.class', '-delete')
shell('rm', '-rf', 'jython-testresults.xml')


def show_targets():
"""show the list of valid targets (this list)"""
Expand All @@ -277,8 +238,6 @@ def show_targets():
'build', 'wheel', None,
'sphinx', 'autosphinx', None,
'clean', 'clean_env', 'clean_test', 'clean_build', 'clean_sphinx', None,
'jython_test', None,
'clean_jenv', 'clean_jtest', None,
]
#docs = '\n'.join([" %s - %s" % (t, LOCALS[t].__doc__) for t in targets])
#print(docs)
Expand Down

0 comments on commit 243a73f

Please sign in to comment.