Adding Python Packages to ParaView Superbuild using toml

I see that superbuild_add_project_python_toml(<NAME> <ARG>...) macro is present in common-superbuild’s cmake/SuperbuildMacros.cmake but it’s never been used anywhere.

Is there any documentation supporting the usage of this macro?

I’ve been trying to add jsonschema python package, but the last version using dates to version 3.2.0 (Nov 18, 2019), which does not officially support Python 3.9.

Instead, I’ve tried adding it using superbuild_add_project_python_toml, and also adding its dependencies, which include importlib_metadata, pyrsistent and zipp.

As soon as the superbuild executes the following macro:

  PACKAGE zipp
  DEPENDS pythonsetuptools)   

I get the following error:

ERROR: Command errored out with exit status 1:
   command: /builds/superbuild/install/bin/python3.9 /tmp/pip-standalone-pip-6qe9pac_/ install --ignore-installed --no-user --prefix /tmp/pip-build-env-ioiq_eip/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=56' 'setuptools_scm[toml]>=3.4.1'
       cwd: None
  Complete output (2 lines):
  ERROR: Could not find a version that satisfies the requirement setuptools>=56 (from versions: none)
  ERROR: No matching distribution found for setuptools>=56

Thank you :slight_smile:

I suspect pythonsetuptools needs to be updated in the superbuild first…though it is 57.4.0 already. FWIW, it has been used in the CMB superbuild however:

Nice to know! We were able to add old enough packages that work with our current setup, but I foresee this being an issue as time goes on.