Skip to content

Commit

Permalink
Remove spack and setup.py related tests and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonis committed Sep 4, 2024
1 parent 1f75046 commit 0feb2ad
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 380 deletions.
114 changes: 1 addition & 113 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,120 +8,8 @@ on:
- "*"

jobs:
setup_for_spack:
name: Run setup.py phases needed by spack
needs: [setup_test]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install & upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup.py phases needed by spack
run: |
python3 setup.py install_lib
python3 setup.py build_ext
setup_install:
name: Run setup install
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup install
run: python3 setup.py install --user
- name: Test install
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
python3 -c "import precice"
setup_install_single_version_externally_managed:
name: Run setup install --single-version-externally-managed (for spack)
needs: [setup_install]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
su root
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup install --single-version-externally-managed
run: python3 setup.py install --single-version-externally-managed --root=/

setup_test:
name: Run setup test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Install OpenMPI, CMake, Boost library, Eigen and pkg-config
run: |
sudo apt-get -yy update
sudo apt-get install -y libopenmpi-dev cmake libboost-all-dev libeigen3-dev pkg-config
sudo rm -rf /var/lib/apt/lists/*
- uses: BSFishy/pip-action@v1
with:
packages: toml
- name: Checkout precice and make required files discoverable
run: |
git clone --branch develop https://github.com/precice/precice.git precice-core
mkdir -p precice
cp precice-core/src/precice/Participant.hpp precice/Participant.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.cpp
cd precice-core
mkdir build && cd build
cmake .. -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DBUILD_TESTING=OFF
- name: Install dependencies
run: |
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup test
env:
PKG_CONFIG_PATH: "precice-core/build"
PKG_CONFIG_SYSTEM_INCLUDE_PATH: 1
run: |
export CFLAGS=-I$GITHUB_WORKSPACE
python3 setup.py test
pip_install:
name: Run pip install
needs: [setup_test]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
Expand All @@ -144,7 +32,7 @@ jobs:
solverdummy_test:
name: Run solverdummy
needs: [setup_install, setup_test]
needs: [pip_install]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/build-env.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/build-spack.yml

This file was deleted.

56 changes: 1 addition & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,66 +59,12 @@ If preCICE (the C++ library) was installed in a custom prefix, or only built but
* `LIBRARY_PATH`, `LD_LIBRARY_PATH` to the library location, or `$prefix/lib`
* `CPATH` either to the `src` directory or the `$prefix/include`

The preCICE documentation provides more informaiton on [linking preCICE](https://precice.org/installation-linking.html).
The preCICE documentation provides more information on [linking preCICE](https://precice.org/installation-linking.html).

### Using Spack

You can also install the python language bindings for preCICE via Spack by installing the Spack package `py-pyprecice`. Refer to [our installation guide for preCICE via Spack](https://precice.org/installation-spack.html) for getting started with Spack.

### Using setup.py

#### preCICE system installs

In this directory, execute:

```bash
$ python3 setup.py install --user
```

#### preCICE at custom location (setting PATHS)

see above. Then run

```bash
$ python3 setup.py install --user
```

#### preCICE at custom location (explicit include path, library path)

1. Install cython and other dependencies via pip3

```bash
$ pip3 install --user setuptools wheel cython packaging numpy
```

2. Open terminal in this folder.
3. Build the bindings

```bash
$ python3 setup.py build_ext --include-dirs=$PRECICE_ROOT/src --library-dirs=$PRECICE_ROOT/build/last
```

**Options:**
* `--include-dirs=`, default: `''`
Path to the headers of preCICE, point to the sources `$PRECICE_ROOT/src`, or the your custom install prefix `$prefix/include`.

**NOTES:**

* If you have built preCICE using CMake, you can pass the path to the CMake binary directory using `--library-dirs`.
* It is recommended to use preCICE as a shared library here.

4. Install the bindings

```bash
$ python3 setup.py install --user
```

5. Clean-up *optional*

```bash
$ python3 setup.py clean --all
```

## Test the installation

Update `LD_LIBRARY_PATH` such that python can find `precice.so`
Expand Down
65 changes: 0 additions & 65 deletions spack/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions spack/ci-spack-pyprecice-deps-2404.dockerfile

This file was deleted.

Loading

0 comments on commit 0feb2ad

Please sign in to comment.