Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused pysb2amici / sbml2amici / DEExporter compiler argument #2168

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions python/sdist/amici/de_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,8 @@
due to numerical errors

:ivar compiler:
distutils/setuptools compiler selection to build the Python extension
Absolute path to the compiler executable to be used to build the Python
extension, e.g. ``/usr/bin/clang``.

:ivar functions:
carries C++ function signatures and other specifications
Expand Down Expand Up @@ -2755,8 +2756,8 @@
used to avoid problems with state variables that may become
negative due to numerical errors

:param compiler: distutils/setuptools compiler selection to build the
python extension
:param compiler: Absolute path to the compiler executable to be used
to build the Python extension, e.g. ``/usr/bin/clang``.

:param allow_reinit_fixpar_initcond:
see :class:`amici.de_export.DEExporter`
Expand Down Expand Up @@ -2876,8 +2877,8 @@
Make model compilation verbose

:param compiler:
distutils/setuptools compiler selection to build the python
extension
Absolute path to the compiler executable to be used to build the Python
extension, e.g. ``/usr/bin/clang``.
"""
# setup.py assumes it is run from within the model directory
module_dir = self.model_path
Expand All @@ -2900,8 +2901,10 @@
]
)

env = os.environ.copy()
if compiler is not None:
script_args.extend([f"--compiler={compiler}"])
# CMake will use the compiler specified in the CXX environment variable
env["CXX"] = compiler

Check warning on line 2907 in python/sdist/amici/de_export.py

View check run for this annotation

Codecov / codecov/patch

python/sdist/amici/de_export.py#L2907

Added line #L2907 was not covered by tests

# distutils.core.run_setup looks nicer, but does not let us check the
# result easily
Expand All @@ -2912,6 +2915,7 @@
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
check=True,
env=env,
)
except subprocess.CalledProcessError as e:
print(e.output.decode("utf-8"))
Expand Down
4 changes: 2 additions & 2 deletions python/sdist/amici/pysb_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def pysb2amici(
errors
:param compiler:
distutils/setuptools compiler selection to build the python
extension
Absolute path to the compiler executable to be used to build the Python
extension, e.g. ``/usr/bin/clang``.
:param compute_conservation_laws:
if set to ``True``, conservation laws are automatically computed and
Expand Down
4 changes: 2 additions & 2 deletions python/sdist/amici/sbml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ def sbml2amici(
negative due to numerical errors
:param compiler:
distutils/setuptools compiler selection to build the
python extension
Absolute path to the compiler executable to be used to build the Python
extension, e.g. ``/usr/bin/clang``.
:param allow_reinit_fixpar_initcond:
see :class:`amici.de_export.ODEExporter`
Expand Down