Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
btalb committed Jul 14, 2022
2 parents fee5e8e + eeb0468 commit 14e9cd7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions setup.py
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):
Expand Down Expand Up @@ -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)))
Expand All @@ -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),
Expand All @@ -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',
Expand Down

0 comments on commit 14e9cd7

Please sign in to comment.