CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
setup Namespace Reference

Classes

class  ParallelBuildExt

Functions

 find_root ()
 find_swig ()
 generate_wrapper ()
 ssl_paths ()
 copy_sources ()
 make_extension ()

Variables

 HERE = os.path.dirname(os.path.abspath(__file__))
str PY_LIMITED_API = "0x030A0000"
 ROOT = find_root()
 GEN = os.path.join(HERE, "build", "swig")
 SRC = os.path.join(HERE, "build", "cmsdk")
str CPPFILES
str IS_WIN = "win32"
str IS_MAC = "darwin"
 IS_LINUX = sys.platform.startswith("linux")
 USE_SSL = os.environ.get("CMSDK_NO_SSL", "") not in ("1", "true", "yes")
 ext = make_extension()
 ext_modules
 py_modules
 package_dir
 cmdclass
 options

Detailed Description

Build the cmsdk3 wheel: the full CMSDK SWIG binding (_cmsdk3 + cmsdk3.py) as one stable-ABI (abi3)
extension per platform, so `pip install cmsdk3` works on Python 3.10 and every later 3.x.

The extension is compiled from the CMSDK C++ sources directly (no prebuilt libCMSDK.a), with a SWIG
wrapper generated here for the target OS (the committed src/cmsdk3_wrap.cxx is LP64/Linux-flavoured).
SWIG comes from the PyPI `swig` package (build requirement), so the same recipe runs on Linux, macOS and
Windows. Used by cibuildwheel (see pyproject.toml), or locally: `pip wheel CMSDK/python-wheel`.

Environment knobs:
  CMSDK_ROOT         path to the CMSDK tree (default: the parent dir, or ./cmsdk-src in an sdist)
  CMSDK_NO_SSL=1     build without OpenSSL (no https/wss/SSL connections in the binding)
  CMSDK_OPENSSL_DIR  OpenSSL prefix (include/ + lib/) when it is not on the default paths
  CMSDK_OPENSSL_INCLUDE, CMSDK_OPENSSL_LIB  separate include and lib dirs (e.g. Windows release-static/lib)
  CMSDK_JOBS         parallel compile jobs (default: CPU count)

Function Documentation

◆ copy_sources()

setup.copy_sources ( )
Mirror ROOT/src and ROOT/include under build/cmsdk: setuptools refuses absolute source paths, and a
relative path with '..' would put object files outside the build dir (or fail across Windows drives).

Definition at line 115 of file setup.py.

Referenced by make_extension().

◆ find_root()

setup.find_root ( )

Definition at line 30 of file setup.py.

◆ find_swig()

setup.find_swig ( )

Definition at line 63 of file setup.py.

Referenced by generate_wrapper().

◆ generate_wrapper()

setup.generate_wrapper ( )
Run SWIG for this OS and make the wrapper limited-API clean (as `make swig3` does).

Definition at line 77 of file setup.py.

References find_swig().

Referenced by make_extension().

◆ make_extension()

setup.make_extension ( )

Definition at line 123 of file setup.py.

References copy_sources(), generate_wrapper(), and ssl_paths().

◆ ssl_paths()

setup.ssl_paths ( )

Definition at line 96 of file setup.py.

Referenced by make_extension().

Variable Documentation

◆ cmdclass

setup.cmdclass

Definition at line 192 of file setup.py.

◆ CPPFILES

str setup.CPPFILES
Initial value:
1= """
2ComponentMemory.cpp ConsoleOutput.cpp
3DataMapsMemory.cpp DataMessage.cpp MemoryController.cpp TemporalMemory.cpp HTML.cpp
4MemoryRequestConnection.cpp MemoryRequestServer.cpp MemoryRequestQueues.cpp
5MemoryCommander.cpp MemoryManager.cpp NetworkConnections.cpp
6NetworkManager.cpp NetworkProtocols.cpp ProcessMemory.cpp ProcessMemoryFuzz.cpp ProcessMemoryConcFuzz.cpp PsyAPI.cpp
7PsyInternal.cpp PsySpace.cpp PsySSL.cpp PsyTime.cpp Subscriptions.cpp
8ThreadManager.cpp MovingAverage.cpp UnitTest_CMSDK.cpp UnitTestFramework.cpp Utils.cpp Stats.cpp
9xml_parser.cpp MessageIndex.cpp jsmn.cpp Bitmap.cpp Base64.cpp Observations.cpp VantagePoints.cpp
10LLMConnection.cpp
11RequestGateway.cpp RequestClient.cpp RequestExecutor.cpp RESTAPI.cpp MathClasses.cpp MessagePlayer.cpp
12hash/keccak.cpp hash/sha3.cpp hash/crc32.cpp hash/md5.cpp hash/sha1.cpp hash/sha256.cpp hash/HashTest.cpp
13""".split()

Definition at line 43 of file setup.py.

◆ ext

setup.ext = make_extension()

Definition at line 187 of file setup.py.

◆ ext_modules

setup.ext_modules

Definition at line 189 of file setup.py.

◆ GEN

setup.GEN = os.path.join(HERE, "build", "swig")

Definition at line 38 of file setup.py.

◆ HERE

setup.HERE = os.path.dirname(os.path.abspath(__file__))

Definition at line 26 of file setup.py.

◆ IS_LINUX

setup.IS_LINUX = sys.platform.startswith("linux")

Definition at line 59 of file setup.py.

◆ IS_MAC

str setup.IS_MAC = "darwin"

Definition at line 58 of file setup.py.

◆ IS_WIN

str setup.IS_WIN = "win32"

Definition at line 57 of file setup.py.

◆ options

setup.options

Definition at line 193 of file setup.py.

◆ package_dir

setup.package_dir

Definition at line 191 of file setup.py.

◆ PY_LIMITED_API

str setup.PY_LIMITED_API = "0x030A0000"

Definition at line 27 of file setup.py.

◆ py_modules

setup.py_modules

Definition at line 190 of file setup.py.

◆ ROOT

setup.ROOT = find_root()

Definition at line 37 of file setup.py.

◆ SRC

setup.SRC = os.path.join(HERE, "build", "cmsdk")

Definition at line 39 of file setup.py.

◆ USE_SSL

setup.USE_SSL = os.environ.get("CMSDK_NO_SSL", "") not in ("1", "true", "yes")

Definition at line 60 of file setup.py.