1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

science/py-dwave-optimization: New port: DWave: Nonlinear models for industrial optimization problems

This commit is contained in:
Yuri Victorovich 2024-07-14 23:49:07 -07:00
parent 1b42a6b38b
commit af92280d8c
5 changed files with 53 additions and 0 deletions

View File

@ -328,6 +328,7 @@
SUBDIR += py-dwave-neal
SUBDIR += py-dwave-networkx
SUBDIR += py-dwave-ocean-sdk
SUBDIR += py-dwave-optimization
SUBDIR += py-dwave-preprocessing
SUBDIR += py-dwave-samplers
SUBDIR += py-dwave-system

View File

@ -0,0 +1,42 @@
PORTNAME= dwave-optimization
DISTVERSION= 0.1.0
CATEGORIES= science python # quantum-computing
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= DWave: Nonlinear models for industrial optimization problems
WWW= https://github.com/dwavesystems/dwave-optimization
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>0:lang/cython3@${PY_FLAVOR} \
${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}setuptools-dso>=2.10:devel/py-setuptools-dso@${PY_FLAVOR}
RUN_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}reno>=4.1.0:textproc/py-reno@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils cython autoplist
POST_PLIST= fix-plist
post-install:
# strip binaries
@${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/optimization/libdwave-optimization.so \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/optimization/model${PYTHON_EXT_SUFFIX}.so \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/optimization/symbols${PYTHON_EXT_SUFFIX}.so
# remove conflicting __init__.py, see https://github.com/dwavesystems/dwave-system/issues/462
@${RM} -r \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__init__.py \
${STAGEDIR}${PYTHON_SITELIBDIR}/dwave/__pycache__
fix-plist:
@${REINPLACE_CMD} -e " \
s|.*dwave/__init__\.py||; \
s|.*dwave/__pycache__/.*|| \
" ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1721017559
SHA256 (dwave-optimization-0.1.0.tar.gz) = 585b69026d26e9f99b9c8552a68dae794960cd94582ccdf973d2eb30a6303b9e
SIZE (dwave-optimization-0.1.0.tar.gz) = 725660

View File

@ -0,0 +1,6 @@
dwave-optimization enables the formulation of nonlinear models for industrial
optimization problems. The package includes:
* a class for nonlinear models used by the Leap service's quantum-classical
hybrid nonlinear-program solver
* model generators for common optimization problems

View File

@ -0,0 +1 @@
%%PYTHON_SITELIBDIR%%/dwave/optimization/libdwave-optimization.so