summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoreDgar2022-08-29 10:58:56 +0200
committereDgar2022-08-29 10:58:56 +0200
commite80e215d2984ba6f4dc1efd7000b996d19f18312 (patch)
tree8c80618773b2ee1d06a7237a2dd2aaed074b4b48
parent7c76ab1a02c95917caa52d7cb8b42dfbf87b4339 (diff)
downloadaur-e80e215d2984ba6f4dc1efd7000b996d19f18312.tar.gz
build from git release to re-enable test_version.py https://fenicsproject.discourse.group/t/does-the-test-suite-of-basix-need-an-update/9124/4
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD35
3 files changed, 28 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c1912f54890e..ef26e122d45a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = fenics-basix-git
- pkgdesc = C++ interface of FEniCS for ordinary and partial differential equations.
- pkgver = 0.5.1.dev0.0.1.0.258.g888e38ce
+ pkgdesc = Interface of FEniCS for ordinary and partial differential equations (C++ and Python from git release).
+ pkgver = 0.5.0.post0
pkgrel = 1
url = https://github.com/FEniCS/basix
arch = i686
@@ -14,16 +14,15 @@ pkgbase = fenics-basix-git
depends = xtensor-blas
depends = pybind11
depends = petsc
- optdepends = python-numba
- provides = basix=0.5.1.dev0.0.1.0.258.g888e38ce
- provides = python-basix=0.5.1.dev0.0.1.0.258.g888e38ce
- provides = python-basix-git=0.5.1.dev0.0.1.0.258.g888e38ce
- provides = python-fenics-basix=0.5.1.dev0.0.1.0.258.g888e38ce
+ provides = basix=0.5.0.post0
+ provides = python-basix=0.5.0.post0
+ provides = python-basix-git=0.5.0.post0
+ provides = python-fenics-basix=0.5.0.post0
conflicts = basix
conflicts = python-basix
conflicts = python-basix-git
conflicts = python-fenics-basix
- replaces = basix=0.5.1.dev0.0.1.0.258.g888e38ce
+ replaces = basix=0.5.0.post0
options = !emptydirs
source = git+https://github.com/FEniCS/basix
sha256sums = SKIP
diff --git a/.gitignore b/.gitignore
index 4a72e03c2c48..9de1635e5aaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.bak
*\~
*.pkg.tar.xz
+*.pkg.tar.zst
*.tar.bz2
*.tar.gz
/pkg
diff --git a/PKGBUILD b/PKGBUILD
index d64280f44e43..d92cbfd8931b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=fenics-basix-git
_base=basix
-pkgdesc="C++ interface of FEniCS for ordinary and partial differential equations."
-pkgver=0.5.1.dev0.0.1.0.258.g888e38ce
+pkgdesc="Interface of FEniCS for ordinary and partial differential equations (C++ and Python from git release)."
+pkgver=0.5.0.post0
pkgrel=1
arch=('i686' 'x86_64')
url="https://github.com/FEniCS/basix"
@@ -11,7 +11,6 @@ license=('GPL3')
groups=('fenics-git')
depends=('xtensor' 'xtensor-blas' 'pybind11' 'petsc')
makedepends=('git' 'boost')
-optdepends=('python-numba')
checkdepends=("python-sympy")
options=(!emptydirs)
source=("git+${url}")
@@ -99,21 +98,29 @@ export F90=mpif90
export LANG=en_IE.UTF-8
export LC_ALL=en_IE.UTF-8
+_base_dir="${startdir}"/src/"${_base}"
+
+prepare() {
+ cd "${_base_dir}"
+ git checkout origin/release
+}
+
pkgver() {
- cd "${srcdir}/${_base}"
+ cd "${_base_dir}"
_gitver=$(git describe --tags --match '*.*' | tr '-' '.')
- # Gets the version from setup.py
- # (prototype: version='0.5.1.dev0')
- _pyver=$(grep 'version=' \
- "${srcdir}"/"${_base}"/python/setup.py |
- tr -d ",'" | cut -d"=" -f2)
- printf "%s.%s" "$_pyver" "$_gitver"
+ # # Gets the version from setup.py
+ # # (prototype: version='0.5.1.dev0')
+ # _pyver=$(grep 'version=' \
+ # "${srcdir}"/"${_base}"/python/setup.py |
+ # tr -d ",'" | cut -d"=" -f2)
+ # printf "%s.%s" "$_pyver" "$_gitver"
+ printf "%s" "${_gitver##v}"
}
build() {
[ -n "$PETSC_DIR" ] && source /etc/profile.d/petsc.sh
- cd "${srcdir}"/"${_base}"/cpp
+ cd "${_base_dir}"/cpp
# Add CBLAS to linking libraries
# (https://github.com/davisking/dlib/issues/154#issuecomment-240651490)
sed -i 's%\(target_link_libraries(basix PRIVATE ${BLAS_LIBRARIES})\)%\nset(BLAS_LIBRARIES "-lcblas;-lblas")\n\1%' "${srcdir}"/"${_base}"/cpp/CMakeLists.txt
@@ -124,15 +131,13 @@ build() {
-DXTENSOR_OPTIMIZE=TRUE
cmake --build "${srcdir}"/build
- _pydir="${srcdir}"/"${_base}"/python
+ _pydir="${_base_dir}"/python
cd "${_pydir}"
python setup.py build
}
check() {
- cd "${srcdir}"/"${_base}"
- # Temporary hack. Already reported on forum
- mv test/test_version.py{,.disabled}
+ cd "${_base_dir}"
pytest test
}