Modify setup.py.in to force root to be platform-dependent
parent
c4d7e622a9
commit
d0e25bc41b
|
@ -9,10 +9,10 @@ PROJECT_DIR="$2"
|
||||||
export PYTHON="python${PYTHON_VERSION}"
|
export PYTHON="python${PYTHON_VERSION}"
|
||||||
|
|
||||||
yum install -y wget ninja-build
|
yum install -y wget ninja-build
|
||||||
pip install -r $PROJECT_DIR/python/dev_requirements.txt
|
$(which $PYTHON) -m pip install -r $PROJECT_DIR/python/dev_requirements.txt
|
||||||
|
|
||||||
# Install Boost
|
# Install Boost
|
||||||
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz
|
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz --quiet
|
||||||
tar -xzf boost_1_87_0.tar.gz
|
tar -xzf boost_1_87_0.tar.gz
|
||||||
cd boost_1_87_0
|
cd boost_1_87_0
|
||||||
./bootstrap.sh --prefix=/opt/boost
|
./bootstrap.sh --prefix=/opt/boost
|
||||||
|
@ -39,5 +39,5 @@ cmake $PROJECT_DIR \
|
||||||
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
|
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
|
||||||
-DCMAKE_INSTALL_PREFIX=$PROJECT_DIR/gtsam_install
|
-DCMAKE_INSTALL_PREFIX=$PROJECT_DIR/gtsam_install
|
||||||
|
|
||||||
cd $PROJECT_DIR/build
|
cd $PROJECT_DIR/build/python
|
||||||
make -j$(nproc) install
|
make -j$(nproc) install
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Setup file to install the GTSAM package."""
|
"""Setup file to install the GTSAM package."""
|
||||||
|
|
||||||
from setuptools import setup, find_namespace_packages
|
from setuptools import setup, find_namespace_packages, Distribution
|
||||||
|
|
||||||
packages = find_namespace_packages(
|
packages = find_namespace_packages(
|
||||||
where=".",
|
where=".",
|
||||||
|
@ -20,6 +20,10 @@ package_data = {
|
||||||
# Cleaner to read in the contents rather than copy them over.
|
# Cleaner to read in the contents rather than copy them over.
|
||||||
readme_contents = open("${GTSAM_SOURCE_DIR}/README.md").read()
|
readme_contents = open("${GTSAM_SOURCE_DIR}/README.md").read()
|
||||||
|
|
||||||
|
class BinaryDistribution(Distribution):
|
||||||
|
def has_ext_modules(foo):
|
||||||
|
return True
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='gtsam',
|
name='gtsam',
|
||||||
description='Georgia Tech Smoothing And Mapping library',
|
description='Georgia Tech Smoothing And Mapping library',
|
||||||
|
@ -46,6 +50,7 @@ setup(
|
||||||
packages=packages,
|
packages=packages,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
package_data=package_data,
|
package_data=package_data,
|
||||||
|
distclass=BinaryDistribution,
|
||||||
test_suite="gtsam.tests",
|
test_suite="gtsam.tests",
|
||||||
install_requires=open("${GTSAM_SOURCE_DIR}/python/requirements.txt").readlines(),
|
install_requires=open("${GTSAM_SOURCE_DIR}/python/requirements.txt").readlines(),
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
|
Loading…
Reference in New Issue