Skip to content

Commit d0e25bc

Browse files
committed
Modify setup.py.in to force root to be platform-dependent
1 parent c4d7e62 commit d0e25bc

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

build_tools/wheels/cibw_before_all.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ PROJECT_DIR="$2"
99
export PYTHON="python${PYTHON_VERSION}"
1010

1111
yum install -y wget ninja-build
12-
pip install -r $PROJECT_DIR/python/dev_requirements.txt
12+
$(which $PYTHON) -m pip install -r $PROJECT_DIR/python/dev_requirements.txt
1313

1414
# Install Boost
15-
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz
15+
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz --quiet
1616
tar -xzf boost_1_87_0.tar.gz
1717
cd boost_1_87_0
1818
./bootstrap.sh --prefix=/opt/boost
@@ -39,5 +39,5 @@ cmake $PROJECT_DIR \
3939
-DGTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF \
4040
-DCMAKE_INSTALL_PREFIX=$PROJECT_DIR/gtsam_install
4141

42-
cd $PROJECT_DIR/build
42+
cd $PROJECT_DIR/build/python
4343
make -j$(nproc) install

python/setup.py.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Setup file to install the GTSAM package."""
22

3-
from setuptools import setup, find_namespace_packages
3+
from setuptools import setup, find_namespace_packages, Distribution
44

55
packages = find_namespace_packages(
66
where=".",
@@ -20,6 +20,10 @@ package_data = {
2020
# Cleaner to read in the contents rather than copy them over.
2121
readme_contents = open("${GTSAM_SOURCE_DIR}/README.md").read()
2222

23+
class BinaryDistribution(Distribution):
24+
def has_ext_modules(foo):
25+
return True
26+
2327
setup(
2428
name='gtsam',
2529
description='Georgia Tech Smoothing And Mapping library',
@@ -46,6 +50,7 @@ setup(
4650
packages=packages,
4751
include_package_data=True,
4852
package_data=package_data,
53+
distclass=BinaryDistribution,
4954
test_suite="gtsam.tests",
5055
install_requires=open("${GTSAM_SOURCE_DIR}/python/requirements.txt").readlines(),
5156
zip_safe=False,

0 commit comments

Comments
 (0)