Skip to content

Commit

Permalink
[Python] Add README.txt documenting changed sample location
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 6, 2022
1 parent 04aa1ac commit 1c9de9c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion interfaces/cython/SConscript
Expand Up @@ -117,7 +117,8 @@ env['python_module'] = mod
env['python_extension'] = ext

localenv.Depends(mod, [ext, dataFiles, setup_cfg, readme, license,
"setup.py", "pyproject.toml", "cantera/test/README.txt"])
"setup.py", "pyproject.toml",
"cantera/test/README.txt", "cantera/examples/README.txt"])
localenv.Depends(ext, localenv['cantera_staticlib'])

for f in (multi_glob(localenv, 'cantera', 'py') +
Expand Down
5 changes: 5 additions & 0 deletions interfaces/cython/cantera/examples/README.txt
@@ -0,0 +1,5 @@
Starting with Cantera 3.0, Python examples are no longer packaged with the Python
module. Examples illustrating the usage of the Python module can be found on Cantera's
website (https://cantera.org). Alternatively, examples can be accessed in the directory
"samples/python" of the source code, which can be retrieved from the project's GitHub
repository (https://github.com/Cantera/cantera).
8 changes: 4 additions & 4 deletions interfaces/cython/setup.cfg.in
Expand Up @@ -50,10 +50,10 @@ packages =

[options.package_data]
cantera.data = *.*, */*.*
# The module extension needs to be here since we don't want setuptools to
# compile the extension, so there are no `source` files in
# the setup.py extension.
cantera = *.pxd, *@module_ext@, test/*.txt
# The module extension needs to be here since we don't want setuptools to compile
# the extension, so there are no ``source`` files in the setup.py ``extension`` and
# we have to treat the module as package data.
cantera = *.pxd, *@module_ext@, test/*.txt, examples/*.txt

[options.extras_require]
hdf5 = h5py
Expand Down
2 changes: 1 addition & 1 deletion interfaces/python_sdist/setup.cfg.in
Expand Up @@ -53,7 +53,7 @@ packages =
# included in the wheel.
[options.package_data]
cantera.data = *.*, */*.*
cantera = *.pxd
cantera = *.pxd, test/*.txt, examples/*.txt

# These options exclude data from the wheel file but not from the sdist
[options.exclude_package_data]
Expand Down
4 changes: 2 additions & 2 deletions test/python/test_reactor.py
Expand Up @@ -1565,7 +1565,7 @@ class CombustorTestImplementation:
"""
These tests are based on the sample:
interfaces/cython/cantera/examples/reactors/combustor.py
samples/python/reactors/combustor.py
with some simplifications so that they run faster and produce more
consistent output.
Expand Down Expand Up @@ -1671,7 +1671,7 @@ class WallTestImplementation:
"""
These tests are based on the sample:
interfaces/cython/cantera/examples/reactors/reactor2.py
samples/python/reactors/reactor2.py
with some simplifications so that they run faster and produce more
consistent output.
Expand Down

0 comments on commit 1c9de9c

Please sign in to comment.