# Adding Python Packages to ParaView Superbuild using toml

**URL:** https://discourse.paraview.org/t/adding-python-packages-to-paraview-superbuild-using-toml/12518
**Category:** Development
**Created:** [July 14, 2023, 7:26pm UTC](https://discourse.paraview.org/t/adding-python-packages-to-paraview-superbuild-using-toml/12518 "2023-07-14T19:26:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![HollowSun0](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hollowsun0/32/431_2.png) [@HollowSun0](https://discourse.paraview.org/u/HollowSun0)
#### Post date: [July 14, 2023, 7:26pm UTC](https://discourse.paraview.org/t/adding-python-packages-to-paraview-superbuild-using-toml/12518/1 "2023-07-14T19:26:16Z")

</div>

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 setup.py 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:

```auto
superbuild_add_project_python_toml(pythonzipp
  PACKAGE zipp
  DEPENDS pythonsetuptools)   

```

I get the following error:

```auto
ERROR: Command errored out with exit status 1:
   command: /builds/superbuild/install/bin/python3.9 /tmp/pip-standalone-pip-6qe9pac_/ __env_pip__.zip/pip 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 🙂

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [July 20, 2023, 5:53pm UTC](https://discourse.paraview.org/t/adding-python-packages-to-paraview-superbuild-using-toml/12518/2 "2023-07-20T17:53:18Z")

</div>

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:

[https://gitlab.kitware.com/cmb/cmb-superbuild/-/blob/master/projects/pythonmeshio.cmake](https://gitlab.kitware.com/cmb/cmb-superbuild/-/blob/master/projects/pythonmeshio.cmake)

---

<div class="post-metadata">

### Author: ![HollowSun0](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hollowsun0/32/431_2.png) [@HollowSun0](https://discourse.paraview.org/u/HollowSun0)
#### Post date: [July 25, 2023, 7:07pm UTC](https://discourse.paraview.org/t/adding-python-packages-to-paraview-superbuild-using-toml/12518/3 "2023-07-25T19:07:49Z")

</div>

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.
