Skip to content

Commit

Permalink
made all pip calls to sitepackage install to enable better cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Oct 11, 2023
1 parent 1dc5d69 commit 1d14787
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (BUILD_PYTHON_BINDINGS)
set(PYTHON_SITE_PACKAGES "${DLIO_PYTHON_SITE}")
else()
if (USER_INSTALL)
execute_process (COMMAND python3 -c "import site; print(site.USER_SITE)" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
set(PYTHON_SITE_PACKAGES "${CMAKE_INSTALL_PREFIX}")
else()
execute_process (COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def build_extension(self, ext: CMakeExtension) -> None:
cmake_args = []
from distutils.sysconfig import get_python_lib
install_prefix = f"{get_python_lib()}/dlio_profiler"
if "DLIO_LOGGER_USER" in os.environ:
install_prefix=f"{site.USER_SITE}/dlio_profiler"
cmake_args += [f"-DUSER_INSTALL=ON"]
# if "DLIO_LOGGER_USER" in os.environ:
# install_prefix=f"{site.USER_SITE}/dlio_profiler"
# cmake_args += [f"-DUSER_INSTALL=ON"]
if "DLIO_PROFILER_DIR" in os.environ:
install_prefix = os.environ['DLIO_PROFILER_DIR']
cmake_args += [f"-DCMAKE_INSTALL_PREFIX={install_prefix}"]
Expand Down

0 comments on commit 1d14787

Please sign in to comment.