[Python] Add deprecation warnings for the old Python module
The old Python module will be removed after releasing Cantera 2.1.
This commit is contained in:
parent
f8ac8ea7c3
commit
8292de3ee8
2 changed files with 16 additions and 0 deletions
|
|
@ -4,6 +4,15 @@
|
|||
Python Module Documentation (Legacy)
|
||||
====================================
|
||||
|
||||
.. warning::
|
||||
|
||||
This version of the Cantera Python module is deprecated. The last version
|
||||
of Cantera that this module will be included with is Cantera 2.1. Starting
|
||||
with Cantera 2.1, a new Python module (based on the Cython package) is
|
||||
available. When compiling Cantera, the new module can be build by using the
|
||||
SCons option ``python_package=new``. Changes to the user interface are documented in :ref:`sec-cython-documentation`.
|
||||
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@ from importFromFile import *
|
|||
import os as _os
|
||||
import sys as _sys
|
||||
|
||||
import warnings
|
||||
warnings.warn(
|
||||
"\nThis version of the Cantera Python module is deprecated and will not be\n"
|
||||
"available in Cantera 2.2 or later. For details on the new module, see\n"
|
||||
"http://cantera.github.io/dev-docs/sphinx/html/cython/index.html\n",
|
||||
stacklevel=2)
|
||||
|
||||
if not os.getenv('PYTHON_CMD'):
|
||||
# Setting PYTHON_CMD here avoids issues with .cti -> .xml conversions
|
||||
# in cases where the python interpreter isn't in the system path.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue