Skip to content

Commit

Permalink
science/py-spglib: Build using PEP517 tools instead of cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Feb 12, 2024
1 parent 9e7ebc1 commit 8aafb5f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 125 deletions.
16 changes: 6 additions & 10 deletions science/py-spglib/Makefile
@@ -1,6 +1,7 @@
PORTNAME= spglib
DISTVERSIONPREFIX= v
DISTVERSION= 2.3.1
PORTREVISION= 1
CATEGORIES= science python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

Expand All @@ -12,18 +13,17 @@ LICENSE= BSD3CLAUSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scikit-build-core>0:devel/py-scikit-build-core@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyproject-metadata>0:devel/py-pyproject-metadata@${PY_FLAVOR} \
cmake:devel/cmake-core \
${PYNUMPY}
LIB_DEPENDS= libsymspg.so:science/spglib
RUN_DEPENDS= ${PYNUMPY}

USES= cmake python
USE_PYTHON= flavors pytest # tests fail to run, see https://github.com/spglib/spglib/issues/192
USES= python
USE_PYTHON= pep517 autoplist pytest # tests fail to run, see https://github.com/spglib/spglib/issues/192
USE_GITHUB= yes

CMAKE_ARGS= -DPython3_EXECUTABLE=${PYTHON_CMD}

WRKSRC_SUBDIR= python

MAKE_ENV= SETUPTOOLS_SCM_PRETEND_VERSION=${DISTVERSION}

TEST_WRKSRC= ${WRKSRC}
Expand All @@ -33,10 +33,6 @@ post-patch:
##@cd ${WRKSRC} && ${RLN} ../test .
#@cd ${WRKSRC} && ${CP} -r ../test .
# workaround for https://github.com/spglib/spglib/issues/429
@${REINPLACE_CMD} -i '' -e 's|^from ._version import|#&|' ${WRKSRC}/spglib/__init__.py
# patch in the correct symspg lib
@${REINPLACE_CMD} -i '' \
-e 's|, bundled_lib)|, "${LOCALBASE}/lib/libsymspg.so")|' \
${WRKSRC}/spglib/spglib.py
@${REINPLACE_CMD} -i '' -e 's|^from ._version import|#&|' ${WRKSRC}/python/spglib/__init__.py

.include <bsd.port.mk>
42 changes: 0 additions & 42 deletions science/py-spglib/files/patch-CMakeLists.txt

This file was deleted.

31 changes: 0 additions & 31 deletions science/py-spglib/files/patch-spglib_spglib.py

This file was deleted.

39 changes: 0 additions & 39 deletions science/py-spglib/files/quick-test.py

This file was deleted.

3 changes: 0 additions & 3 deletions science/py-spglib/pkg-plist

This file was deleted.

0 comments on commit 8aafb5f

Please sign in to comment.