summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3d8ade0b16d0d5ea79987cd07a726d4b4886eaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: yuhldr <yuhldr@qq.com>

pkgname=('python-phonopy')
pkgver=3.5.1
pkgrel=1
pkgdesc="Phonopy is an open source package for phonon calculations at harmonic and quasi-harmonic levels"
arch=('any')
url="https://github.com/phonopy/phonopy"
license=('BSD')
depends=(
    "python-numpy"
    "python-yaml"
    "python-matplotlib"
    "spglib"
    "python-h5py"
    "python-symfc"
)
optdepends=(
    "python-seekpath"
)
makedepends=(
    python-pip
    cmake
    gcc
    ninja
)

source=("git+https://github.com/phonopy/phonopy.git#tag=v${pkgver}")
sha256sums=('SKIP')

build() {
  cd "$srcdir"/phonopy
  rm -rf dist

  python -m venv _buildenv
  _buildenv/bin/pip install --upgrade pip
  _buildenv/bin/pip install \
    numpy \
    scikit-build-core \
    "nanobind<2.10.0" \
    setuptools-scm \
    build

  _buildenv/bin/python -m build --wheel --no-isolation
}


package() {
  cd "$srcdir"/phonopy
  PIP_CONFIG_FILE=/dev/null pip install \
    --isolated --root="$pkgdir" \
    --ignore-installed --no-deps dist/*.whl
}