PROTON-490: Add py27 to tox and fix the sdist step (cherry picked from commit e5a8b0418ac15d42e0950f6f14c599a62524db14)
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d09e93e5 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d09e93e5 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d09e93e5 Branch: refs/heads/kgiusti-python3 Commit: d09e93e56c56619242d6a4d92107036b9f3fee67 Parents: ce45c3a Author: Flavio Percoco <flape...@gmail.com> Authored: Wed Jun 17 16:05:28 2015 +0200 Committer: Ken Giusti <kgiu...@apache.org> Committed: Wed Jun 17 11:27:32 2015 -0400 ---------------------------------------------------------------------- proton-c/bindings/python/setup.py | 20 +++++++++++++++----- proton-c/bindings/python/tox.ini | 25 +++++++++---------------- 2 files changed, 24 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d09e93e5/proton-c/bindings/python/setup.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/setup.py b/proton-c/bindings/python/setup.py index e6fbb79..1738a14 100755 --- a/proton-c/bindings/python/setup.py +++ b/proton-c/bindings/python/setup.py @@ -98,6 +98,7 @@ class Configure(build_ext): return compiler.compiler_type def bundle_libqpid_proton_extension(self): + setup_path = os.path.dirname(os.path.realpath(__file__)) base = self.get_finalized_command('build').build_base build_include = os.path.join(base, 'include') install = self.get_finalized_command('install').install_base @@ -107,11 +108,20 @@ class Configure(build_ext): log.info("Using bundled libqpid-proton") if 'QPID_PROTON_SRC' not in os.environ: - bundledir = os.path.join(base, "bundled") - if not os.path.exists(bundledir): - os.makedirs(bundledir) - bundle.fetch_libqpid_proton(bundledir) - libqpid_proton_dir = os.path.abspath(os.path.join(bundledir, 'qpid-proton')) + if not os.path.exists(os.path.join(setup_path, 'tox.ini')): + bundledir = os.path.join(base, "bundled") + if not os.path.exists(bundledir): + os.makedirs(bundledir) + bundle.fetch_libqpid_proton(bundledir) + libqpid_proton_dir = os.path.abspath(os.path.join(bundledir, 'qpid-proton')) + else: + # This should happen just in **dev** environemnts since + # tox.ini is not shipped with the driver. It should only + # be triggered when calling `setup.py`. This can happen either + # manually or when calling `tox` in the **sdist** step. Tox will + # defined the `QPID_PROTON_SRC` itself. + proton_c = os.path.join(setup_path, '..', '..', '..') + libqpid_proton_dir = os.path.abspath(proton_c) else: libqpid_proton_dir = os.path.abspath(os.environ['QPID_PROTON_SRC']) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d09e93e5/proton-c/bindings/python/tox.ini ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/tox.ini b/proton-c/bindings/python/tox.ini index b2277da..acfa5a1 100644 --- a/proton-c/bindings/python/tox.ini +++ b/proton-c/bindings/python/tox.ini @@ -1,13 +1,16 @@ [tox] -envlist = build,py34 +envlist = py27,py34 minversion = 1.4 skipdist = True [testenv] usedevelop = False -changedir = {toxinidir}/../../proton-c/include/ +#changedir = {toxinidir}/../../proton-c/include/ setenv = VIRTUAL_ENV={envdir} + PKG_CONFIG_PATH=None + QPID_PROTON_SRC={toxinidir}/../../../ + DEBUG=True passenv = PKG_CONFIG_PATH CFLAGS @@ -20,18 +23,8 @@ commands = flake8 [testenv:docs] commands = python setup.py build_sphinx -[testenv:py34] -platform = linux -setenv = - VIRTUAL_ENV={envdir} - PKG_CONFIG_PATH=None - QPID_PROTON_SRC={toxinidir}/../../../ - DEBUG=True +[testenv:py27] +platform = linux|linux2 -[testenv:build] -platform = linux2 -setenv = - VIRTUAL_ENV={envdir} - PKG_CONFIG_PATH=None - QPID_PROTON_SRC={toxinidir}/../../../ - DEBUG=True \ No newline at end of file +[testenv:py34] +platform = linux|linux2 \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org