Package Base Details: dolfinx-git

Git Clone URL: (read-only, click to copy)
Submitter: rmsc
Maintainer: rmsc (carlosal1015)
Last Packager: rmsc
Votes: 1
Popularity: 0.008894
First Submitted: 2023-08-23 15:57 (UTC)
Last Updated: 2023-08-26 09:59 (UTC)

Latest Comments

rmsc commented on 2023-09-29 10:12 (UTC)

First of all, thanks for the comment.

This is a split PKGBUILD and it's meant to produce two packages by design. That way the user may choose to install just the c++ library if he chooses to. Compilation is already only done once.

See here:

entshuld commented on 2023-09-28 21:05 (UTC)

In this way, you avoid multiple installations and buildings (it's a hack):

pkgname=(dolfinx-git dolfinx-git-test)
build() {
  [ -n "$PETSC_DIR" ] && [ -f /etc/profile.d/ ] && source /etc/profile.d/
  [ -n "$SLEPC_DIR" ] && [ -f /etc/profile.d/ ] && source /etc/profile.d/

    -S "${_base}"/cpp
    -B "${build_dir}"
  cmake ${CONFOPTS[@]}

  cmake --build "${build_dir}" --target all --parallel

package_dolfinx-git() {
  DESTDIR="${pkgdir}" cmake --install "${_base}"/cpp/build
  install -Dm 644 "${_base}"/COPYING -t "${pkgdir}/usr/share/licenses/${_base}"
  # Remove insecure runpath
  chrpath --delete "${pkgdir}/usr/lib/"

  cd "${_base_dir}"/python
  python -m build --wheel --no-isolation --skip-dependency-check
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" \
                     python -m installer --destdir="$pkgdir" dist/*.whl

  # Remove insecure runpath
  find "$pkgdir" -iname "cpp.cpython*so" | parallel chrpath --delete

package_dolfinx-git-test() {
  # KISS check (instead of installing 3 times)
  cd "${_base_dir}"
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer python/dist/*.whl
  test-env/bin/python -m pytest -ra || printf "Tests failed\n"