You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2018/02/22 03:01:24 UTC

[1/2] qpid-proton git commit: PROTON-1768: Allow the tox tests on all platforms

Repository: qpid-proton
Updated Branches:
  refs/heads/master 391397f59 -> f86e74f8c


PROTON-1768: Allow the tox tests on all platforms


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b5553d12
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b5553d12
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b5553d12

Branch: refs/heads/master
Commit: b5553d123c26ebf8e3738ded1bd0a2edc1fe3280
Parents: 391397f
Author: Andrew Stitcher <as...@apache.org>
Authored: Wed Feb 21 17:26:03 2018 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Wed Feb 21 21:53:27 2018 -0500

----------------------------------------------------------------------
 proton-c/CMakeLists.txt | 60 +++++++++++++++++++++++---------------------
 1 file changed, 31 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b5553d12/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index d3b290e..192d766 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -765,39 +765,41 @@ if (BUILD_PYTHON)
               ${PYTHON_EXECUTABLE} -- ${python_coverage_options} "${py_root}/proton-test")
   set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed")
 
-  # Eventually, we'll get rid of this check when other
-  # platforms will be supported. Since `setup.py` will skip
-  # the build for non linux plaforms, it doesn't make sense
-  # to try to run them.
-  option(TOX_TEST "Enable muti-version python testing with TOX" ON)
-  set(tox_default "py26,py27,py33,py34,py35,py36")
-  set(TOX_ENVLIST ${tox_default} CACHE STRING "List of python environments for TOX tests" )
-  if (NOT (TOX_ENVLIST STREQUAL tox_default))
-    message(WARNING "non-default TOX test set '${TOX_ENVLIST}' (default '${tox_default}')")
-  endif()
-  if (CMAKE_SYSTEM_NAME STREQUAL Linux AND TOX_TEST)
-    find_program(TOX_EXE "tox")
-    if (CMAKE_BUILD_TYPE MATCHES "Coverage")
-      message(STATUS "Building for coverage analysis; skipping the python-tox-tests")
-    elseif (TOX_EXE)
-      configure_file(
-        "${CMAKE_CURRENT_SOURCE_DIR}/tox.ini.in"
-        "${CMAKE_CURRENT_BINARY_DIR}/tox.ini")
-      add_test (NAME python-tox-test
-                COMMAND ${env_py}
+  find_program(TOX_EXECUTABLE "tox")
+  mark_as_advanced(TOX_EXECUTABLE)
+  if (TOX_EXECUTABLE)
+    option(ENABLE_TOX_TEST "Enable muti-version python testing with TOX" ON)
+
+    set(tox_default "py26,py27,py33,py34,py35,py36")
+    set(TOX_ENVLIST ${tox_default} CACHE STRING "List of python environments for TOX tests" )
+    mark_as_advanced(TOX_ENVLIST)
+
+    if (NOT (TOX_ENVLIST STREQUAL tox_default))
+      message(WARNING "non-default TOX test set '${TOX_ENVLIST}' (default '${tox_default}')")
+    endif()
+    if (ENABLE_TOX_TEST)
+      if (CMAKE_BUILD_TYPE MATCHES "Coverage")
+        message(STATUS "Building for coverage analysis; skipping the python-tox-tests")
+      else ()
+        configure_file(
+          "${CMAKE_CURRENT_SOURCE_DIR}/tox.ini.in"
+          "${CMAKE_CURRENT_BINARY_DIR}/tox.ini")
+        add_test (NAME python-tox-test
+                  COMMAND ${env_py}
                   "PATH=${py_path}"
                   "SASLPASSWD=${SASLPASSWD_EXE}"
                   "SWIG=${SWIG_EXECUTABLE}"
                   ${VALGRIND_ENV}
-                  ${TOX_EXE})
-      set_tests_properties(python-tox-test
-                           PROPERTIES
-                             PASS_REGULAR_EXPRESSION "Totals: .* ignored, 0 failed"
-                             FAIL_REGULAR_EXPRESSION "ERROR:[ ]+py[0-9]*: commands failed")
-    else (TOX_EXE)
-      message(STATUS "The tox tool is not available; skipping the python-tox-tests")
-    endif ()
-  endif (CMAKE_SYSTEM_NAME STREQUAL Linux AND TOX_TEST)
+                  ${TOX_EXECUTABLE})
+        set_tests_properties(python-tox-test
+                             PROPERTIES
+                               PASS_REGULAR_EXPRESSION "Totals: .* ignored, 0 failed"
+                               FAIL_REGULAR_EXPRESSION "ERROR:[ ]+py[0-9]*: commands failed")
+      endif ()
+    endif (ENABLE_TOX_TEST)
+  else (TOX_EXECUTABLE)
+    message(STATUS "The tox tool is not available; skipping the python-tox-tests")
+  endif(TOX_EXECUTABLE)
 
   set (perf_pythonpath "${py_pythonpath}" "${CMAKE_SOURCE_DIR}/examples/cpp")
   to_native_path ("${perf_pythonpath}" perf_pythonpath)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: PROTON-1769: Fix Python Pypi package to work for more platforms

Posted by as...@apache.org.
PROTON-1769: Fix Python Pypi package to work for more platforms


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f86e74f8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f86e74f8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f86e74f8

Branch: refs/heads/master
Commit: f86e74f8caed4a857fcaf38fb948f8e34c807be1
Parents: b5553d1
Author: Andrew Stitcher <as...@apache.org>
Authored: Wed Feb 21 19:44:01 2018 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Wed Feb 21 21:53:35 2018 -0500

----------------------------------------------------------------------
 .travis.yml                                 |  6 ++++--
 proton-c/bindings/python/CMakeLists.txt     |  1 -
 proton-c/bindings/python/setup.py.in        | 13 ++++---------
 proton-c/bindings/python/setuputils/misc.py |  4 ++--
 4 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f86e74f8/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 7eb7e8c..6d75c5e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,7 +35,8 @@ matrix:
   - os: osx
     osx_image: xcode7.3
     env:
-    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
+    - PKG_CONFIG_PATH='/usr/local/opt/openssl/lib/pkgconfig'
+    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
     before_install:
     - brew update
     - brew upgrade python openssl
@@ -44,7 +45,8 @@ matrix:
   - os: osx
     osx_image: xcode9
     env:
-    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
+    - PKG_CONFIG_PATH='/usr/local/opt/openssl/lib/pkgconfig'
+    - QPID_PROTON_CMAKE_ARGS='-DPROACTOR=libuv -DSASL_IMPL=none -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DBUILD_PERL=OFF -DBUILD_RUBY=OFF'
     before_install:
     - brew update
     - brew upgrade python openssl

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f86e74f8/proton-c/bindings/python/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/CMakeLists.txt b/proton-c/bindings/python/CMakeLists.txt
index 28fed01..ce15451 100644
--- a/proton-c/bindings/python/CMakeLists.txt
+++ b/proton-c/bindings/python/CMakeLists.txt
@@ -168,7 +168,6 @@ set (all_src
   ${qpid-proton-include-extra}
   ${qpid-proton-layers-all}
   ${qpid-proton-platform-all}
-  ${qpid-proton-proactor}
   ${qpid-proton-private-includes}
   include/proton/cproton.i
 )

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f86e74f8/proton-c/bindings/python/setup.py.in
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/setup.py.in b/proton-c/bindings/python/setup.py.in
index 6249cbf..fe584e3 100755
--- a/proton-c/bindings/python/setup.py.in
+++ b/proton-c/bindings/python/setup.py.in
@@ -144,14 +144,14 @@ class Configure(build_ext):
                   'schannel.c',
                   'ssl_stub.c',
                   'cyrus_sasl.c',
-                  'cyrus_stub.c',
-                  'libuv.c']
+                  'cyrus_stub.c']
         sources = filter(lambda x: os.path.basename(x) not in cfgdep, sources)
         sources = [os.path.join(proton_base, x) for x in sources]
 
         # Look for any optional libraries that proton needs, and adjust the
         # source list and compile flags as necessary.
         libraries = []
+        includes = []
 
         # -D flags (None means no value, just define)
         macros=[('qpid_proton_EXPORTS', None),
@@ -163,6 +163,7 @@ class Configure(build_ext):
         # return True and we'll use it. Otherwise, we'll use the stub.
         if misc.pkg_config_version_installed('openssl', atleast='0'):
             libraries += ['ssl', 'crypto']
+            includes += [misc.pkg_config_get_var('openssl', 'includedir')]
             sources.append(os.path.join(proton_src, 'ssl', 'openssl.c'))
         else:
             sources.append(os.path.join(proton_src, 'ssl', 'ssl_stub.c'))
@@ -194,12 +195,6 @@ class Configure(build_ext):
                      " PLAIN mechanisms will be supported!")
             sources.append(os.path.join(proton_src, 'sasl', 'cyrus_stub.c'))
 
-        # Include proactor if libuv is available
-        if cc.has_function('uv_tcp_init', includes=['uv.h'],
-                           libraries=['uv']):
-            libraries.append('uv')
-            sources.append(os.path.join(proton_src, 'proactor', 'libuv.c'))
-
         # compile all the proton sources.  We'll add the resulting list of
         # objects to the _cproton extension as 'extra objects'.  We do this
         # instead of just lumping all the sources into the extension to prevent
@@ -213,7 +208,7 @@ class Configure(build_ext):
                              macros=macros,
                              include_dirs=[build_include,
                                            proton_include,
-                                           proton_src],
+                                           proton_src]+includes,
                              # compiler command line options:
                              extra_postargs=['-std=gnu99'],
                              output_dir=self.build_temp)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f86e74f8/proton-c/bindings/python/setuputils/misc.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/setuputils/misc.py b/proton-c/bindings/python/setuputils/misc.py
index 54a8fde..1aa5556 100644
--- a/proton-c/bindings/python/setuputils/misc.py
+++ b/proton-c/bindings/python/setuputils/misc.py
@@ -66,7 +66,7 @@ def pkg_config_version_installed(package, version=None, atleast=None):
             return False
         log.info("Using %s version %s (found via pkg-config)" %
                  (package,
-                  _call_pkg_config(['--modversion', package]).communicate()[0]))
+                  _call_pkg_config(['--modversion', package]).communicate()[0].splitlines()[0]))
         return True
     return False
 
@@ -82,5 +82,5 @@ def pkg_config_get_var(package, name):
     if p.returncode:
         out = ""
         log.warn(err)
-    return out
+    return out.splitlines()[0]
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org