Skip to main content

Overview

This is the recipe that will build the CellML API Python bindings with all options enabled by default. Currently, there are some limitations, such as all dependencies required to build the CellML API must be installed before this recipe can be used, and I don’t think this will work under Windows at the moment.

Supported options

The recipe supports the following options:

api-version

CellML API version to build. Valid versions any versions that build via CMake and has Python bindings (>1.10), and must be present in the list of valid versions.

cmake-generator

The generator to use. Only the default option Unix Makefiles is supported, as this recipe is built on top of zc.recipe.cmmi which will make use of make and make install.

check-build

Whether to check build time dependencies. Default is off because it didn’t detect GSL libraries even though it was installed for me. Same as passing -DCHECK_BUILD:BOOL=OFF to cmake.

Other supported options:

  • enable-examples

  • enable-annotools

  • enable-ccgs

  • enable-celeds

  • enable-celeds-exporter

  • enable-cevas

  • enable-cis

  • enable-cuses

  • enable-gsl-integrators

  • enable-malaes

  • enable-python

  • enable-rdf

  • enable-spros

  • enable-srus

  • enable-telicems

  • enable-vacss

Please refer to the CellML API Documentations for what these options do.

Usage

As this egg is published on pypi, this recipe can be used right away by including a new part inside a buildout.cfg. The following is an example configuration:

[buildout]
parts =
    ...
    cellml-api
    cellmlpy

[cellml-api]
recipe = cellml.recipe.api
api-version = 1.10

[cellmlpy]
recipe = zc.recipe.egg
eggs =
interpreter = cellmlpy
scripts = cellmlpy
extra-paths = ${cellml-api:location}/lib/python

This example buildout.cfg will build the CellML API v1.10 with all the supported options enabled, and a script will be generated in bin/cellmlpy which will allow the bindings to be imported without setting PYTHONPATH and other related environmental variables. Please refer to the examples directory for more detailed instructions and other example usages of this recipe.

0.8 (2022-04-27)

  • Force a known supported CXX standard because newest gcc defaults to the incompatible c++17 standard.

0.7 (2019-01-23)

  • Update distribution location.

0.6 (2018-07-31)

  • Python 3 compatibility.

0.5 (2018-01-23)

  • Added latest version of CellML API on github.

  • Added RUNPATH into place.

0.4 (2012-11-05)

  • Added CellML API 1.12.

0.3 (2012-10-03)

  • Corrected typo for the TeLICeM flag.

  • Added CellML API 1.11.

0.2 (2011-09-21)

  • Fixed the issue where all the expected keys are assigned with an empty string even if unassigned; this caused various unwanted side effects.

  • Fixed the issue where the location of this buildout recipe is undefined.

0.1 (2011-09-21)

  • Initial release of the CellML API Python bindings buildout.

Detailed Documentation

Demonstration

This recipe extends on the zc.recipe.cmmi with the caveat where cmake is called instead of the ./configure scripts, yet have cmake generate Unix Makefiles such that the make/make install that cmmi calls will proceed as normal.

For the demonstration, instead of download/building the entire API, we are going to make use of the mock-ups (which is previous setup).

>>> ls(distros)
-  cellml-api-0.0fake.tgz

>>> distros_url = start_server(distros)
>>> archive_url = '%scellml-api-0.0fake.tgz' % distros_url

Let’s create our buildout, but modified so that we use our fake archive.

>>> write('buildout.cfg',
... """
... [buildout]
... parts = cellml-api
...
... [cellml-api]
... recipe = cellml.recipe.api
... api-version = 0.0fake
... """)

As our mocked up api version is not listed as an available version, buildout will die.

>>> print('start ' + system(buildout))
start...
  Installing.
  Getting ... cellml-api.
  Initializing ... cellml-api.
...
Traceback (most recent call last):
...
ValueError: api-version `0.0fake` is not a supported version of...
<BLANKLINE>

Well, since our fake version is obviously not going to be added into the listing of supported APIs, we can still provide our url and md5sum, as the original function provided by zc.recipe.cmmi is still in effect. Rewrite buildout.cfg with the desired attributes.

>>> try: from hashlib import md5
... except ImportError: from md5 import new as md5
>>> m = md5(open(join(distros, 'cellml-api-0.0fake.tgz'), 'rb'
...             ).read()).hexdigest()
>>> write('buildout.cfg',
... """
... [buildout]
... parts = cellml-api
...
... [cellml-api]
... recipe = cellml.recipe.api
... url = %s
... md5sum = %s
... """ % (archive_url, m))

>>> print('start ' + system(buildout))
start...
...
CMake Warning:
  Manually-specified variables were not used by the project:
<BLANKLINE>
    CHECK_BUILD
    ENABLE_ANNOTOOLS
    ENABLE_CCGS
    ENABLE_CELEDS
    ENABLE_CELEDS_EXPORTER
    ENABLE_CEVAS
    ENABLE_CGRS
    ENABLE_CIS
    ENABLE_CUSES
    ENABLE_EXAMPLES
    ENABLE_GSL_INTEGRATORS
    ENABLE_MALAES
    ENABLE_PYTHON
    ENABLE_RDF
    ENABLE_SPROS
    ENABLE_SRUS
    ENABLE_TELICEMS
    ENABLE_VACSS
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>

Contributors

Tommy Yu, Author

Download

Release files for cellml.recipe.api 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cellml.recipe.api 0.8
File Interpreter ABI Platform
cellml.recipe.api-0.8-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / cellml.recipe.api-0.8-py2.py3-none-any.whl

Download URL cellml.recipe.api-0.8-py2.py3-none-any.whl
Size 10.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4f380c6648496722631b4e7506629ec3386d9378f7db1a05ec6978e2138e0f7d
BLAKE2b-256 checksum
How to use checksums
997de3e292267bac706830cdad6d8304b2d7478b99d1e242f3f3e54508f4f58e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.13

Release history Release notifications | RSS feed

This release

0.8 This release

1 release file

0.7

1 release file

0.6

2 release files

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page