update python files

This commit is contained in:
Bastian Bloessl
2013-07-16 12:24:31 +02:00
parent d4b42d23ca
commit b24cef3e32
2 changed files with 40 additions and 10 deletions
+12 -10
View File
@@ -16,18 +16,20 @@
# #
######################################################################## ########################################################################
# Setup python install # Include python install macros
######################################################################## ########################################################################
include(GrPython) include(GrPython)
if(NOT PYTHONINTERP_FOUND)
return()
endif()
list(APPEND python_sources ########################################################################
__init__.py # Install python sources
) ########################################################################
GR_PYTHON_INSTALL( GR_PYTHON_INSTALL(
FILES ${python_sources} FILES
DESTINATION ${GR_PYTHON_DIR}/gnuradio/ieee802_11 __init__.py
COMPONENT "ieee802_11_python" DESTINATION ${GR_PYTHON_DIR}/ieee802_11
) )
######################################################################## ########################################################################
@@ -35,6 +37,6 @@ GR_PYTHON_INSTALL(
######################################################################## ########################################################################
include(GrTest) include(GrTest)
#set(GR_TEST_TARGET_DEPS gnuradio-ieee802-15-4) set(GR_TEST_TARGET_DEPS gnuradio-ieee802-11)
#set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig) set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)
#GR_ADD_TEST(qa_howto ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_howto.py) #GR_ADD_TEST(qa_howto ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_howto.py)
+28
View File
@@ -15,5 +15,33 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# ----------------------------------------------------------------
# Temporary workaround for ticket:181 (swig+python problem)
import sys
_RTLD_GLOBAL = 0
try:
from dl import RTLD_GLOBAL as _RTLD_GLOBAL
except ImportError:
try:
from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL
except ImportError:
pass
if _RTLD_GLOBAL != 0:
_dlopenflags = sys.getdlopenflags()
sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL)
# ----------------------------------------------------------------
# import swig generated symbols into the test namespace
from ieee802_11_swig import * from ieee802_11_swig import *
# import any pure python here
#
# ----------------------------------------------------------------
# Tail of workaround
if _RTLD_GLOBAL != 0:
sys.setdlopenflags(_dlopenflags) # Restore original flags
# ----------------------------------------------------------------