You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2017/09/06 16:24:29 UTC

qpid-interop-test git commit: QPIDIT-94: Solving Python 2.x path discovery issue

Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 78938fc50 -> 986f0f488


QPIDIT-94: Solving Python 2.x path discovery issue


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/986f0f48
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/986f0f48
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/986f0f48

Branch: refs/heads/master
Commit: 986f0f4888c09cb02efc4456c37c62559f56b1ba
Parents: 78938fc
Author: Kim van der Riet <kp...@apache.org>
Authored: Wed Sep 6 12:24:15 2017 -0400
Committer: Kim van der Riet <kp...@apache.org>
Committed: Wed Sep 6 12:24:15 2017 -0400

----------------------------------------------------------------------
 CMakeLists.txt      | 13 ++++++++-----
 get-python-dir-name | 19 +++++++++++++++++++
 2 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/986f0f48/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69af53c..a18fc88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,11 @@ project(qpid-interop-test)
 
 cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
 
+# Find Python 2.x install path
+
+execute_process(COMMAND ${CMAKE_SOURCE_DIR}/get-python-dir-name
+                OUTPUT_VARIABLE PYTHON_DIR_NAME)
+message(STATUS "Python install directory name: ${PYTHON_DIR_NAME}")
 
 # Find Proton components
 
@@ -51,16 +56,14 @@ add_subdirectory(shims/rhea-js)
 add_subdirectory(docs)
 
 # Install files using python setup.py
+install(CODE "MESSAGE(STATUS \"Python install dir: ${CMAKE_INSTALL_PREFIX}/lib/${PYTHON_DIR_NAME}/site-packages/qpid_interop_test/\")")
 install(CODE "execute_process(COMMAND python setup.py install --prefix ${CMAKE_INSTALL_PREFIX}
                               WORKING_DIRECTORY ../)")
 
 # TODO: THIS IS UGLY!
 # Find a way to handle this as part of the Python install process instead
 # Set the following Python scripts to executable:
-install(CODE "execute_process(COMMAND chmod +x amqp_large_content_test.py
-                                               amqp_types_test.py
-                                               jms_hdrs_props_test.py
-                                               jms_messages_test.py
-                              WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/python2.7/site-packages/qpid_interop_test/)")
+install(CODE "execute_process(COMMAND bash -c \"chmod +x *_test.py\"
+                              WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/${PYTHON_DIR_NAME}/site-packages/qpid_interop_test/)")
 
 configure_file(config.sh.in config.sh)

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/986f0f48/get-python-dir-name
----------------------------------------------------------------------
diff --git a/get-python-dir-name b/get-python-dir-name
new file mode 100755
index 0000000..e7515e6
--- /dev/null
+++ b/get-python-dir-name
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+PYTHON_DIR=`ls -d /usr/lib/python2*`
+echo -n ${PYTHON_DIR##*/}


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