Commit 6b0244e2 authored by Alex Hornby's avatar Alex Hornby Committed by Facebook GitHub Bot

update boost rpm package names for centos stream

Summary:
rpm names needed updating as boost-contract wasn't found.

The rpm names now include the boost version which should be handy when boost dependency is updated next

Unfortunately the centos boost 1.69 rpms aren't found automatically by the centos cmake boost rules, so this also adds builder.py logic to point to it using  BOOST_INCLUDEDIR and BOOST_LIBRARYDIR

Reviewed By: mzr

Differential Revision: D32140834

fbshipit-source-id: 3e2dd822613957ae4d7be5b73623ff581f11d02b
parent c20ad836
......@@ -442,6 +442,7 @@ if __name__ == "__main__":
build_dir,
inst_dir,
defines,
loader=None,
final_install_prefix=None,
extra_cmake_defines=None,
):
......@@ -457,6 +458,7 @@ if __name__ == "__main__":
self.defines = defines or {}
if extra_cmake_defines:
self.defines.update(extra_cmake_defines)
self.loader = loader
def _invalidate_cache(self):
for name in [
......@@ -566,6 +568,24 @@ if __name__ == "__main__":
# tests.
defines["CMAKE_BUILD_WITH_INSTALL_RPATH"] = "ON"
boost_169_is_required = False
if self.loader:
for m in self.loader.manifests_in_dependency_order():
preinstalled = m.get_section_as_dict("preinstalled.env", self.ctx)
boost_169_is_required = "BOOST_ROOT_1_69_0" in preinstalled.keys()
if boost_169_is_required:
break
if (
boost_169_is_required
and self.build_opts.allow_system_packages
and self.build_opts.host_type.get_package_manager()
and self.build_opts.host_type.get_package_manager() == "rpm"
):
# Boost 1.69 rpms don't install cmake config to the system, so to point to them explicitly
defines["BOOST_INCLUDEDIR"] = "/usr/include/boost169"
defines["BOOST_LIBRARYDIR"] = "/usr/lib64/boost169"
defines.update(self.defines)
define_args = ["-D%s=%s" % (k, v) for (k, v) in defines.items()]
......
......@@ -497,6 +497,7 @@ class ManifestParser(object):
build_dir,
inst_dir,
defines,
loader,
final_install_prefix,
extra_cmake_defines,
)
......
......@@ -11,6 +11,7 @@ import email
import os
import re
import stat
from typing import List
from .builder import BuilderBase, CMakeBuilder
......@@ -182,6 +183,7 @@ class PythonWheelBuilder(BuilderBase):
src_dir=self.build_dir,
build_dir=self.build_dir,
inst_dir=self.inst_dir,
loader=None,
defines={},
final_install_prefix=None,
)
......
......@@ -16,37 +16,37 @@ BOOST_ROOT_1_69_0
libboost-all-dev
[rpms]
boost
boost-math
boost-test
boost-fiber
boost-graph
boost-log
boost-openmpi
boost-timer
boost-chrono
boost-locale
boost-thread
boost-atomic
boost-random
boost-static
boost-contract
boost-date-time
boost-iostreams
boost-container
boost-coroutine
boost-filesystem
boost-system
boost-stacktrace
boost-regex
boost-devel
boost-context
boost-python3-devel
boost-type_erasure
boost-wave
boost-python3
boost-serialization
boost-program-options
boost169
boost169-math
boost169-test
boost169-fiber
boost169-graph
boost169-log
boost169-openmpi
boost169-timer
boost169-chrono
boost169-locale
boost169-thread
boost169-atomic
boost169-random
boost169-static
boost169-contract
boost169-date-time
boost169-iostreams
boost169-container
boost169-coroutine
boost169-filesystem
boost169-system
boost169-stacktrace
boost169-regex
boost169-devel
boost169-context
boost169-python3-devel
boost169-type_erasure
boost169-wave
boost169-python3
boost169-serialization
boost169-program-options
[build]
builder = boost
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment