Improve tox configuration.
parent
4666f606d9
commit
bc732dca08
|
|
@ -3,6 +3,7 @@
|
||||||
*.class
|
*.class
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
|
env/
|
||||||
.ropeproject/globalnames
|
.ropeproject/globalnames
|
||||||
.ropeproject/history
|
.ropeproject/history
|
||||||
.ropeproject/objectdb
|
.ropeproject/objectdb
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,25 @@ Setup test requirements
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
::
|
::
|
||||||
sudo apt-get install python2.7-dev g++ maven
|
sudo apt-get install python2.7-dev python3-dev python3-venv g++ maven
|
||||||
cd mockdriver
|
cd <JAYDEBEAPI_WORKDIR>
|
||||||
mvn install
|
python3 -m venv env
|
||||||
|
. env/bin/activate
|
||||||
|
pip install -rdev-requirements.txt
|
||||||
|
|
||||||
virtualenv ~/.virtualenvs/jaydebeapi-py27 -p /usr/bin/python2.7
|
# Install Jython 2.7
|
||||||
. ~/.virtualenvs/jaydebeapi-py27/bin/activate
|
ci/mvnget.sh org.python:jython-installer:2.7.0
|
||||||
pip install -r dev-requirements.txt -r requirements-python-2.7.txt jip==0.9.9
|
java -jar jython-installer-2.7.0.jar && rm jython-installer-2.7.0.jar
|
||||||
envsubst < ci/dot_jip > $VIRTUAL_ENV/.jip
|
# add jython to your path
|
||||||
jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
|
||||||
jip install org.hsqldb:hsqldb:1.8.0.10
|
# run tests for all supported envs
|
||||||
jip install org.xerial:sqlite-jdbc:3.7.2
|
tox
|
||||||
|
|
||||||
|
# activate and work on specific env
|
||||||
|
. .tox/py35-driver-mock/bin/activate
|
||||||
export CLASSPATH=$VIRTUAL_ENV/javalib/*
|
export CLASSPATH=$VIRTUAL_ENV/javalib/*
|
||||||
python setup.py develop
|
|
||||||
python test/testsuite.py
|
python test/testsuite.py
|
||||||
|
|
||||||
Build a new release
|
Build a new release
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
|
@ -50,7 +54,7 @@ Build a new release
|
||||||
|
|
||||||
7. Run setuptools to ensure everything is working as expected. ::
|
7. Run setuptools to ensure everything is working as expected. ::
|
||||||
|
|
||||||
$ python setup.py sdist bdist_wheel upload
|
$ python setup.py sdist bdist_wheel upload -r pypitest
|
||||||
|
|
||||||
8. Check the files in ``dist/`` for unwanted or missing files.
|
8. Check the files in ``dist/`` for unwanted or missing files.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
wheel==0.24.0
|
tox==2.6.0
|
||||||
bumpversion==0.5.1
|
wheel==0.29.0
|
||||||
|
bumpversion==0.5.3
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
from __future__ import print_function
|
||||||
|
from os import path
|
||||||
|
import sys
|
||||||
|
|
||||||
|
home=sys.argv[1]
|
||||||
|
with open(path.join(home, '.jip'), "w") as out:
|
||||||
|
print("""[repos:local]
|
||||||
|
uri={0}/.m2/repository/
|
||||||
|
type=local
|
||||||
|
|
||||||
|
[repos:central]
|
||||||
|
uri=http://repo1.maven.org/maven2/
|
||||||
|
type=remote
|
||||||
|
""".format(home), file=out)
|
||||||
5
tox.ini
5
tox.ini
|
|
@ -1,6 +1,7 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py{27,35}-driver-{hsqldb,mock,sqliteXerial},py27-driver-sqlitePy,jython-driver-{hsqldb,mock}
|
envlist = py{27,35}-driver-{hsqldb,mock,sqliteXerial},py27-driver-sqlitePy,jython-driver-{hsqldb,mock}
|
||||||
[testenv]
|
[testenv]
|
||||||
|
whitelist_externals = mvn
|
||||||
# Should be changed to {toxinidir} once i manage to download javalibs in tox
|
# Should be changed to {toxinidir} once i manage to download javalibs in tox
|
||||||
setenv = CLASSPATH = {envdir}/javalib/*
|
setenv = CLASSPATH = {envdir}/javalib/*
|
||||||
driver-mock: TESTNAME=test_mock
|
driver-mock: TESTNAME=test_mock
|
||||||
|
|
@ -14,9 +15,9 @@ deps =
|
||||||
jip==0.9.3
|
jip==0.9.3
|
||||||
commands =
|
commands =
|
||||||
# Should be changed to {toxinidir} once i manage to download javalibs in tox
|
# Should be changed to {toxinidir} once i manage to download javalibs in tox
|
||||||
bash -c \'envsubst < ci/dot_jip > {envdir}/.jip\'
|
python jipconf_subst.py {envdir}
|
||||||
driver-hsqldb: jip install org.hsqldb:hsqldb:1.8.0.10
|
driver-hsqldb: jip install org.hsqldb:hsqldb:1.8.0.10
|
||||||
driver-sqliteXerial: jip install org.xerial:sqlite-jdbc:3.7.2
|
driver-sqliteXerial: jip install org.xerial:sqlite-jdbc:3.7.2
|
||||||
driver-mock: mvn -f mockdriver/pom.xml install
|
driver-mock: mvn -Dmaven.repo.local={distdir}/.m2/repository -f mockdriver/pom.xml install
|
||||||
driver-mock: jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
driver-mock: jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
||||||
{envbindir}/python test/testsuite.py {env:TESTNAME}
|
{envbindir}/python test/testsuite.py {env:TESTNAME}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue