Skip to content

Commit

Permalink
Make lib build directory if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
btalb committed Jul 13, 2022
1 parent 464147f commit 963afef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/build-manylinux-wheels
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ for PYROOT in /opt/python/cp*; do
export Python3_EXECUTABLE="$PYROOT/bin/python"
export Python3_INCLUDE_DIR="$(find "$PYROOT/include/" \
-mindepth 1 -maxdepth 1 -type d)"
# "$Python3_EXECUTABLE" -m pip wheel /io/ --no-clean -w /io/dist/
"$Python3_EXECUTABLE" -m build
done
unset GLOBIGNORE
Expand Down
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,29 @@ def build_cmake(self, exts):

# Move shared objects to the build lib location
# TODO probably should just output them there from CMake... but eh
print("MAKING %s" % build_lib_dir)
os.makedirs(build_lib_dir, exist_ok=True)
print("MOVING %s -> %s" %
(os.path.join(build_dir, 'gtsam', 'python', 'gtsam',
gtsam_so), os.path.join(build_lib_dir, gtsam_so)))
shutil.copy(
os.path.join(build_dir, 'gtsam', 'python', 'gtsam', gtsam_so),
os.path.join(build_lib_dir, gtsam_so))
print("MOVING %s -> %s" %
(os.path.join(build_dir, gtsam_quadrics_so),
os.path.join(build_lib_dir, gtsam_quadrics_so)))
shutil.copy(os.path.join(build_dir, gtsam_quadrics_so),
os.path.join(build_lib_dir, gtsam_quadrics_so))

# Move shared objects to the shared source location
# TODO probably should be behind an '--inplace' flag or something...
print("MOVING %s -> %s" % (os.path.join(
build_lib_dir, gtsam_so), os.path.join(source_dir, gtsam_so)))
shutil.copy(os.path.join(build_lib_dir, gtsam_so),
os.path.join(source_dir, gtsam_so))
print("MOVING %s -> %s" %
(os.path.join(build_lib_dir, gtsam_quadrics_so),
os.path.join(source_dir, gtsam_quadrics_so)))
shutil.copy(os.path.join(build_lib_dir, gtsam_quadrics_so),
os.path.join(source_dir, gtsam_quadrics_so))

Expand Down

0 comments on commit 963afef

Please sign in to comment.