Improve tox configuration.
parent
4666f606d9
commit
bc732dca08
|
|
@ -3,6 +3,7 @@
|
|||
*.class
|
||||
build/
|
||||
dist/
|
||||
env/
|
||||
.ropeproject/globalnames
|
||||
.ropeproject/history
|
||||
.ropeproject/objectdb
|
||||
|
|
|
|||
|
|
@ -10,19 +10,23 @@ Setup test requirements
|
|||
=======================
|
||||
|
||||
::
|
||||
sudo apt-get install python2.7-dev g++ maven
|
||||
cd mockdriver
|
||||
mvn install
|
||||
sudo apt-get install python2.7-dev python3-dev python3-venv g++ maven
|
||||
cd <JAYDEBEAPI_WORKDIR>
|
||||
python3 -m venv env
|
||||
. env/bin/activate
|
||||
pip install -rdev-requirements.txt
|
||||
|
||||
virtualenv ~/.virtualenvs/jaydebeapi-py27 -p /usr/bin/python2.7
|
||||
. ~/.virtualenvs/jaydebeapi-py27/bin/activate
|
||||
pip install -r dev-requirements.txt -r requirements-python-2.7.txt jip==0.9.9
|
||||
envsubst < ci/dot_jip > $VIRTUAL_ENV/.jip
|
||||
jip install org.jaydebeapi:mockdriver:1.0-SNAPSHOT
|
||||
jip install org.hsqldb:hsqldb:1.8.0.10
|
||||
jip install org.xerial:sqlite-jdbc:3.7.2
|
||||
# Install Jython 2.7
|
||||
ci/mvnget.sh org.python:jython-installer:2.7.0
|
||||
java -jar jython-installer-2.7.0.jar && rm jython-installer-2.7.0.jar
|
||||
# add jython to your path
|
||||
|
||||
# run tests for all supported envs
|
||||
tox
|
||||
|
||||
# activate and work on specific env
|
||||
. .tox/py35-driver-mock/bin/activate
|
||||
export CLASSPATH=$VIRTUAL_ENV/javalib/*
|
||||
python setup.py develop
|
||||
python test/testsuite.py
|
||||
|
||||
Build a new release
|
||||
|
|
@ -50,7 +54,7 @@ Build a new release
|
|||
|
||||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
wheel==0.24.0
|
||||
bumpversion==0.5.1
|
||||
tox==2.6.0
|
||||
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]
|
||||
envlist = py{27,35}-driver-{hsqldb,mock,sqliteXerial},py27-driver-sqlitePy,jython-driver-{hsqldb,mock}
|
||||
[testenv]
|
||||
whitelist_externals = mvn
|
||||
# Should be changed to {toxinidir} once i manage to download javalibs in tox
|
||||
setenv = CLASSPATH = {envdir}/javalib/*
|
||||
driver-mock: TESTNAME=test_mock
|
||||
|
|
@ -14,9 +15,9 @@ deps =
|
|||
jip==0.9.3
|
||||
commands =
|
||||
# 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-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
|
||||
{envbindir}/python test/testsuite.py {env:TESTNAME}
|
||||
|
|
|
|||
Loading…
Reference in New Issue