Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pybindings] remove linking to libpython #13695

Merged
merged 1 commit into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmake/BundledBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function(setup_bundled_boost_with_python)

include_directories(SYSTEM ${Boost_INCLUDE_DIRS})

set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} PARENT_SCOPE)
set(Boost_LIBRARIES ${Boost_LIBRARIES} PARENT_SCOPE)

add_subdirectory(pyhelpers)
Expand Down
1 change: 0 additions & 1 deletion generator/mwm_diff/pymwm_diff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ omim_link_libraries(
coding
base
stats_client
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
${LIBZ}
)
Expand Down
1 change: 0 additions & 1 deletion generator/pygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ omim_link_libraries(
sqlite3
${CMAKE_DL_LIBS}
${LIBZ}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
)

Expand Down
1 change: 0 additions & 1 deletion kml/pykmlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ omim_add_library(${PROJECT_NAME} MODULE ${SRC})

omim_link_libraries(
${PROJECT_NAME}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
kml
indexer
Expand Down
1 change: 0 additions & 1 deletion local_ads/pylocal_ads/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ omim_add_library(${PROJECT_NAME} MODULE ${SRC})

omim_link_libraries(
${PROJECT_NAME}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
local_ads
base
Expand Down
23 changes: 1 addition & 22 deletions pyhelpers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,25 +138,6 @@ def findsource(object):
ORIGINAL_CWD = os.getcwd()


def python_static_libdir():
return get_config_var('LIBPL')


def python_ld_library():
LDLIBRARY = get_config_var('LDLIBRARY')
PYTHONFRAMEWORKPREFIX = get_config_var('PYTHONFRAMEWORKPREFIX')
LIBDIR = get_config_var('LIBDIR')
LIBPL = get_config_var('LIBPL')
candidates = [
os.path.join(PYTHONFRAMEWORKPREFIX, LDLIBRARY),
os.path.join(LIBDIR, LDLIBRARY),
os.path.join(LIBPL, LDLIBRARY),
]
for candidate in candidates:
if os.path.exists(candidate):
return candidate


@contextmanager
def chdir(target_dir):
saved_cwd = os.getcwd()
Expand Down Expand Up @@ -310,11 +291,10 @@ def create_boost_config(self):
mkpath(self.omim_builddir)
with open(self.get_boost_config_path(), 'w') as f:
f.write(
'using python : {} : {} : {} : {} ;\n'.format(
'using python : {} : {} : {} ;\n'.format(
get_python_version(),
sys.executable,
get_python_inc(),
python_static_libdir(),
)
)

Expand Down Expand Up @@ -404,7 +384,6 @@ def cmake_pybindings(self):
'-DPYTHON_VERSION={}'.format(get_python_version()),
'-DPYTHON_EXECUTABLE={}'.format(sys.executable),
'-DPYTHON_INCLUDE_DIR={}'.format(get_python_inc()),
'-DPYTHON_LIBRARY={}'.format(python_ld_library()),
OMIM_ROOT,
]
)
Expand Down
1 change: 0 additions & 1 deletion search/pysearch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ omim_link_libraries(
pugixml
stats_client
succinct
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
${LIBZ}
)
Expand Down
1 change: 0 additions & 1 deletion search/pysearch/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ This document describes how to use this module.
-DPYBINDINGS=ON\
-DPYTHON_VERSION=3.7\
-DPYBINDINGS_VERSION=3.7\
-DPYTHON_LIBRARIES=<path-to-libpython.dylib>\
-DPYTHON_INCLUDE_DIRS=<path-to-dir-with-Python.h>\
-DCMAKE_PREFIX_PATH=<path-to-qt5.5>

Expand Down
2 changes: 1 addition & 1 deletion tracking/pytracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ include_directories(${CMAKE_BINARY_DIR})

omim_add_library(${PROJECT_NAME} MODULE ${SRC})

omim_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} tracking coding geometry base)
omim_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} tracking coding geometry base)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
1 change: 0 additions & 1 deletion traffic/pytraffic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ omim_link_libraries(
opening_hours
succinct
icu
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
${LIBZ}
)
Expand Down