Skip to content

Commit

Permalink
Merge pull request #331 from Conan-Kudo/fix-pylinking
Browse files Browse the repository at this point in the history
python: Fix linking to built libraries
  • Loading branch information
oliverkurth authored Jul 8, 2022
2 parents 00b8ee8 + 90c4652 commit 3822fa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pytests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ configure_file(
)

add_custom_target(check
COMMAND pytest
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" pytest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running tests.."
)
9 changes: 2 additions & 7 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ from setuptools import setup
from distutils.core import Extension

cflags = [
'-I@PYTDNF_INC_DIR@'
]

link_args = [
'-Wl,-rpath=@PYTDNF_LIB_DIR@'
'-I@PYTDNF_INC_DIR@',
]

pytdnf_sources = [
Expand All @@ -29,8 +25,7 @@ tdnfmodule = Extension('tdnf._tdnf',
libraries=['tdnf'],
library_dirs=['${PYTDNF_LIB_DIR}'],
sources=pytdnf_sources,
extra_compile_args=cflags,
extra_link_args=link_args)
extra_compile_args=cflags)

setup(name='@PYTDNF_PACKAGE_NAME@',
version='@PYTDNF_VERSION@',
Expand Down

0 comments on commit 3822fa0

Please sign in to comment.