Skip to main content

Python bindings for the Template Numerical Library

Project description

PyTNL

Python bindings for the Template Numerical Library (TNL).

Note: pyproject.toml requires Python 3.12 or later.

Installation

To install PyTNL from source, first make sure that Git is installed and clone the repository:

git clone https://gitlab.com/tnl-project/pytnl.git

Using pip

PyTNL can be installed as a standard Python package using pip as follows:

python -m pip install path/to/pytnl

where path/to/pytnl is the directory where you cloned the PyTNL repository.

This will install CMake from PyPI and start the compilation from C++ source code. The following dependencies are needed for the installation to succeed: a C++ compiler (e.g. GCC or Clang) and an MPI.

You can install all dependencies with one of the following commands, depending on your Linux distribution:

  • Arch Linux:

    pacman -S base-devel git python openmpi
    
  • Ubuntu:

    apt install build-essential git python3-dev libopenmpi-dev
    

Using CMake

To install PyTNL using CMake, the following dependencies are needed: CMake, GNU Make, a C++ compiler (e.g. GCC or Clang), Python 3, and an MPI.

You can install all dependencies with one of the following commands, depending on your Linux distribution:

  • Arch Linux:

    pacman -S base-devel git cmake python openmpi
    
  • Ubuntu:

    apt install build-essential git cmake python3-dev libopenmpi-dev
    

Build and install PyTNL:

cd pytnl
cmake -B build -S . -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/.local"
cmake --build build
cmake --install build

Usage

After installing PyTNL, run python and import some module from the pytnl package, e.g. pytnl.containers.

The examples directory contains some short examples showing how to use PyTNL.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytnl-0.0.1.tar.gz (228.1 kB view details)

Uploaded Source

File details

Details for the file pytnl-0.0.1.tar.gz.

File metadata

  • Download URL: pytnl-0.0.1.tar.gz
  • Upload date:
  • Size: 228.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytnl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 22871e5bfe163c2d63296e5016341f10e7e7b77d058314d7f047e867f4b5dc3e
MD5 2c7e0457fb5589ad2efefedda14bccf6
BLAKE2b-256 37ab1516f2233218f320eb88fedaa53ac1a5a16ba6d6b4b10f067c4674748359

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page