-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import os | ||
import shutil | ||
|
||
from setuptools import find_packages, setup, Extension | ||
from setuptools.command.build_ext import build_ext | ||
import shutil | ||
|
||
|
||
class CMakeExtension(Extension): | ||
|
@@ -42,12 +43,11 @@ def build_cmake(self, exts): | |
# 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', 'python', | ||
'gtsam'), build_lib_dir)) | ||
shutil.rmtree(os.path.join(build_lib_dir, 'gtsam'), ignore_errors=True) | ||
shutil.copytree(os.path.join(build_dir, 'gtsam', 'python', 'gtsam'), | ||
os.path.join(build_lib_dir, 'gtsam')) | ||
print("MOVING %s -> %s" % | ||
(os.path.join(build_dir, gtsam_quadrics_so), | ||
os.path.join(build_lib_dir, gtsam_quadrics_so))) | ||
|
@@ -56,9 +56,10 @@ def build_cmake(self, exts): | |
|
||
# 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), | ||
print("MOVING %s -> %s" % | ||
(os.path.join(build_lib_dir, "gtsam", | ||
gtsam_so), os.path.join(source_dir, gtsam_so))) | ||
shutil.copy(os.path.join(build_lib_dir, "gtsam", gtsam_so), | ||
os.path.join(source_dir, gtsam_so)) | ||
print("MOVING %s -> %s" % | ||
(os.path.join(build_lib_dir, gtsam_quadrics_so), | ||
|
@@ -71,7 +72,7 @@ def build_cmake(self, exts): | |
long_description = f.read() | ||
|
||
setup(name='gtsam_quadrics', | ||
version='0.2.1', | ||
version='0.2.2', | ||
author='Lachlan Nicholson', | ||
author_email='[email protected]', | ||
maintainer='Ben Talbot', | ||
|