From nobody Mon Aug 15 21:12:24 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M66Rr6017z4Yxf8; Mon, 15 Aug 2022 21:12:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M66Rr2N2Xz3cvy; Mon, 15 Aug 2022 21:12:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660597944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=82vyb3kfZ7nsJ9frpC1RS9qiJi0lKZIMSnytkkn0CcM=; b=hoPSGrRpLkLBSYyX1ad0gCZzqvfRpLdY3sJsC6T4Ywm9PbWtAXQqTjoJ8ZqTYeXZXY/s/e e+lokq3MVuwsy4J2k6Det1O0ZDvLs36tqUz8ao+EKwYt5l8z4qubvTS7S1yKj0n19G54Lh kgmQ9QEso+GAERERnLI5W6QFw9y6ru/BkdDs2JuEH/901x2VEoWzICMnZua/XyCtGaiFjE 4BkegHY5nPgCAQtkbGc2sDoqwfG5eFGGJc9asVuAifzQOXFeB9QucIQGTuqXpCZ/Fr+0/+ i0gjJV1FbqzoqG0gshhYhn8UnSr1VVae7AMuXuWfsPPnATpgSYTH0zQS6ow0PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M66Rr1FZFzkgG; Mon, 15 Aug 2022 21:12:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27FLCOVI039502; Mon, 15 Aug 2022 21:12:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27FLCO9D039501; Mon, 15 Aug 2022 21:12:24 GMT (envelope-from git) Date: Mon, 15 Aug 2022 21:12:24 GMT Message-Id: <202208152112.27FLCO9D039501@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: dcbef540c8b0 - main - science/py-pyqubo: New port: DWave: Python DSL for constructing QUBOs from mathematical expressions List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcbef540c8b0f5002152f31989474d6189a94cec Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660597944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=82vyb3kfZ7nsJ9frpC1RS9qiJi0lKZIMSnytkkn0CcM=; b=FPsBUKCOPKUXM35aYT+PPDtBNHk4OlEVluFoBoe+1Ws3AsPjGOUEx4UoHZuozHVGJG9sX+ lLT4fGFpZrml7/+AY7ukE5OlBZCmHlMq/g650ixVC2Ks2pOx+dQC+0YBynaImvTiioQ7aw iSFCHd3uWaGNKDXkEExmjzMoWIqKWS3jtbyvaBeHA5y/pVYFesALEYdKczbzt9vN9ab0Bt L1B66pESquncL4kprBUFwkyRgRovIpV2GyxHqCLaXn+iKbacOD2V4KqKf3+BmnbBzvZlSR 3hQMeEdhEqEqEjbJXHRQq3mviIYKRNJu1xK3UrrnKfTZ/JrlG8bxfHyQziYO9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660597944; a=rsa-sha256; cv=none; b=rMuNT0B1HVGemBdIIFaUo4nYvMzvVal+2UsWa4mraYa9vLZ8xaBXrQapeUHjDtDNreFMRr j9rSCd/CYzRUMJTasL7R3awvj3CSuXqNhXvkqbAs4J01ydQZynyUic9FQAf2zveTK07lb+ R19FhjoQc/2B5l2XaV5XCMB1wkCNutExa8jz0nAhB91ZKEq+lF2pR7cIvfLFa/JRG/yz1h gHj0td31G2kr3X0d56glp6gaTm3La60hDrMypzvUFZdEWzjm3257i938QMTChxbs3KDTkZ MLO42eGJlh5UIKTCZ0XbqK8ix3fO1tJDbpFyFP5udr3sSEA+YBadxOa8ASsTMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=dcbef540c8b0f5002152f31989474d6189a94cec commit dcbef540c8b0f5002152f31989474d6189a94cec Author: Yuri Victorovich AuthorDate: 2022-08-15 21:11:35 +0000 Commit: Yuri Victorovich CommitDate: 2022-08-15 21:12:19 +0000 science/py-pyqubo: New port: DWave: Python DSL for constructing QUBOs from mathematical expressions --- science/Makefile | 1 + science/py-pyqubo/Makefile | 43 ++++++++++++++++++++++++++++ science/py-pyqubo/distinfo | 3 ++ science/py-pyqubo/files/patch-CMakeLists.txt | 20 +++++++++++++ science/py-pyqubo/pkg-descr | 8 ++++++ 5 files changed, 75 insertions(+) diff --git a/science/Makefile b/science/Makefile index 94401dcf6aec..ce9926eeff35 100644 --- a/science/Makefile +++ b/science/Makefile @@ -346,6 +346,7 @@ SUBDIR += py-pymol SUBDIR += py-pyosf SUBDIR += py-pyprecice + SUBDIR += py-pyqubo SUBDIR += py-pysal SUBDIR += py-pyscf SUBDIR += py-pyteomics diff --git a/science/py-pyqubo/Makefile b/science/py-pyqubo/Makefile new file mode 100644 index 000000000000..d3e9b27683a8 --- /dev/null +++ b/science/py-pyqubo/Makefile @@ -0,0 +1,43 @@ +PORTNAME= pyqubo +DISTVERSION= 1.2.0 +CATEGORIES= science python # quantum-computing +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= DWave: Python DSL for constructing QUBOs from mathematical expressions + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}deprecated>=1.2.10:devel/py-deprecated@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dimod>=0.9.14:science/py-dimod@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dwave-neal>=0.5.7:science/py-dwave-neal@${PY_FLAVOR} \ + ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}six>=1.15.0:devel/py-six@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_DEPENDS} \ + ${PYTHON_PKGNAMEPREFIX}codecov>=2.1.9:devel/py-codecov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}coverage>=4.5.1:devel/py-coverage@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}nbsphinx>=0.8.3:textproc/py-nbsphinx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scikit-build>=0.11.1:devel/py-scikit-build@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0.36.2:devel/py-wheel@${PY_FLAVOR} \ + boost-libs>0:devel/boost-libs \ + cimod>0:math/cimod \ + cmake:devel/cmake \ + ninja:devel/ninja \ + pybind11>0:devel/pybind11 \ + robin-hood-hashing>0:devel/robin-hood-hashing +RUN_DEPENDS= ${PY_DEPENDS} + +USES= eigen:3 python:3.8+ +USE_PYTHON= distutils cython autoplist unittest + +USE_GITHUB= yes +GH_ACCOUNT= recruit-communications + +CXXFLAGS+= -I${LOCALBASE}/include/cimod \ + -I${LOCALBASE}/include/eigen3 + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +TEST_WRKSRC= ${WRKSRC}/tests + +.include diff --git a/science/py-pyqubo/distinfo b/science/py-pyqubo/distinfo new file mode 100644 index 000000000000..575f89b6f16b --- /dev/null +++ b/science/py-pyqubo/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1660514425 +SHA256 (recruit-communications-pyqubo-1.2.0_GH0.tar.gz) = a967dc7e4f94aa6d02b21badf5f5b3a95de0dbd435ce98435cc8078e14af73bc +SIZE (recruit-communications-pyqubo-1.2.0_GH0.tar.gz) = 207142 diff --git a/science/py-pyqubo/files/patch-CMakeLists.txt b/science/py-pyqubo/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..4c2ba0ac35ab --- /dev/null +++ b/science/py-pyqubo/files/patch-CMakeLists.txt @@ -0,0 +1,20 @@ +--- CMakeLists.txt.orig 2022-01-08 04:45:42 UTC ++++ CMakeLists.txt +@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.20) + + project(cpp_pyqubo) + ++if (FALSE) + include(external/boost_assert.cmake) + include(external/boost_config.cmake) + include(external/boost_container.cmake) +@@ -17,6 +18,9 @@ include(external/cimod.cmake) + include(external/eigen.cmake) + include(external/pybind11.cmake) + include(external/robin_hood.cmake) ++endif() ++ ++find_package(pybind11) + + pybind11_add_module(cpp_pyqubo src/main.cpp) + diff --git a/science/py-pyqubo/pkg-descr b/science/py-pyqubo/pkg-descr new file mode 100644 index 000000000000..af60236d0664 --- /dev/null +++ b/science/py-pyqubo/pkg-descr @@ -0,0 +1,8 @@ +PyQUBO allows you to create QUBOs or Ising models from flexible mathematical +expressions easily. Some of the features of PyQUBO: +* python based (C++ backend) +* fully integrated with Ocean SDK +* automatic validation of constraints +* placeholder for parameter tuning + +WWW: https://pyqubo.readthedocs.io/en/latest/