Skip to content

Commit

Permalink
Add PEP 723 support for SuiteSparse and SUNDIALS installation script
Browse files Browse the repository at this point in the history
Introduce a TOML-style comment block at the top of the `install_KLU_Sundials.py` script. This block contains essential metadata, including the required Python version and a list of dependencies. This addition aligns the script with the PEP 723 guidelines, enhancing readability and portability for script runners and developers.

The metadata includes:
- The Python version requirement (<=3.9)
- Dependencies required for the script (wget, cmake)
- Additional information like the repository and documentation links

This enhancement facilitates easier script sharing and collaboration, providing a standardized way to specify and access script dependencies and supported Python versions. It also lays the groundwork for potential future tooling that could automate environment setup and dependency installation.

Refer to PEP 723 for more details on this format.

Resolves: pybamm-team#3647
  • Loading branch information
AlessioBugetti authored and js1tr3 committed Aug 12, 2024
1 parent 838e6ac commit 4690da2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/install_KLU_Sundials.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# /// pyproject
# [run]
# requires-python = "<=3.9"
# dependencies = [
# "wget",
# "cmake",
# ]
#
# [additional-info]
# repository = "https://github.com/pybamm-team/PyBaMM"
# documentation = "https://docs.pybamm.org"
# ///
import os
import subprocess
import tarfile
Expand Down

0 comments on commit 4690da2

Please sign in to comment.