Skip to content

Commit

Permalink
minor fixes (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirandaperera authored Feb 9, 2022
1 parent be92253 commit 814a463
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 7 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
default=Path(os.getcwd(), 'build'))
parser.add_argument("-ipath", help='Install directory')

parser.add_argument("--verbose", help='Set verbosity', default=False, action="store_true")

args = parser.parse_args()


Expand Down Expand Up @@ -138,18 +140,20 @@ def build_cpp():
if CONDA_PREFIX:
install_prefix = CONDA_PREFIX
else:
logger.error("install prefix can not be inferred. The build should be in a conda environment")
logger.error(
"install prefix can not be inferred. The build should be in a conda environment")
return

win_cmake_args = "-A x64" if os.name == 'nt' else ""
verb = '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' if args.verbose else ''

cmake_command = f"cmake -DPYCYLON_BUILD={on_off(BUILD_PYTHON)} {win_cmake_args} " \
f"-DCMAKE_BUILD_TYPE={CPP_BUILD_MODE} " \
f"-DCYLON_WITH_TEST={on_off(RUN_CPP_TESTS)} " \
f"-DARROW_BUILD_TYPE=SYSTEM " \
f"{CPPLINT_COMMAND} " \
f"-DCMAKE_INSTALL_PREFIX={install_prefix} " \
f"{CMAKE_FLAGS} {CPP_SOURCE_DIR}"
f"{verb} {CMAKE_FLAGS} {CPP_SOURCE_DIR}"

logger.info(f"Generate command: {cmake_command}")
res = subprocess.call(cmake_command, cwd=BUILD_DIR, shell=True)
Expand Down Expand Up @@ -213,7 +217,7 @@ def build_python():
logger.error("The build should be in a conda environment")
return

python_build_command = f'{PYTHON_EXEC} -m pip install -U .'
python_build_command = f'{PYTHON_EXEC} setup.py install --force'
env = os.environ
env["CYLON_PREFIX"] = str(BUILD_DIR)
if os.name == 'posix':
Expand Down
2 changes: 2 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# For more information about CMake, see http://www.cmake.org #
##########################################################################
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

project(CYLON VERSION 0.5.0)

set(CYLON_VERSION 0.5.0)
Expand Down
9 changes: 5 additions & 4 deletions python/pycylon/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

compiler_directives = {"language_level": 3, "embedsignature": True}


cython_files = ["pycylon/*/*.pyx"]
print("CYTHON: " + str(cython_files))

Expand Down Expand Up @@ -103,9 +102,9 @@
mpi_library_dir = os.popen("mpicc --showme:libdirs").read().strip().split(' ')
library_directories.extend(mpi_library_dir)

print("Libraries: " + str(library_directories))
print("Lib dirs:", library_directories)

libraries = ["arrow", "cylon", "glog"] # todo glogd was added temporarily
libraries = ["arrow", "cylon", "glog"] # todo glogd was added temporarily
cylon_include_dir = os.path.abspath(os.path.join(__file__, "../../..", "cpp", "src"))

_include_dirs = [cylon_include_dir,
Expand All @@ -118,6 +117,8 @@
mpi_include_dir = os.popen("mpicc --showme:incdirs").read().strip().split(' ')
_include_dirs.extend(mpi_include_dir)

print("Include dirs:", _include_dirs)

# Adopted the Cudf Python Build format
# https://github.com/rapidsai/cudf

Expand Down Expand Up @@ -165,4 +166,4 @@
],
zip_safe=False
)
print("Done setup ####################################")
print("Pycylon setup done!")

0 comments on commit 814a463

Please sign in to comment.