public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/dpctl/files/, dev-python/dpctl/
Date: Mon, 12 Dec 2022 15:16:55 +0000 (UTC)	[thread overview]
Message-ID: <1670849374.9e634fb794435f0c083e17567819bfe5161f5c52.andrewammerlaan@gentoo> (raw)

commit:     9e634fb794435f0c083e17567819bfe5161f5c52
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 12 12:49:34 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Dec 12 12:49:34 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=9e634fb7

dev-python/dpctl: add 0.13.0

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 dev-python/dpctl/dpctl-0.13.0.ebuild               | 61 ++++++++++++++++++++++
 .../files/dpctl-0.13.0-dont-fetch-pybind.patch     | 21 ++++++++
 2 files changed, 82 insertions(+)

diff --git a/dev-python/dpctl/dpctl-0.13.0.ebuild b/dev-python/dpctl/dpctl-0.13.0.ebuild
new file mode 100644
index 000000000..5e7567775
--- /dev/null
+++ b/dev-python/dpctl/dpctl-0.13.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1
+
+DESCRIPTION="Data Parallel Control "
+HOMEPAGE="https://github.com/IntelPython/dpctl"
+SRC_URI="https://github.com/IntelPython/dpctl/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/scikit-build[${PYTHON_USEDEP}]
+	dev-python/pybind11[${PYTHON_USEDEP}]
+	dev-python/versioneer[${PYTHON_USEDEP}]
+	dev-util/cmake
+	dev-vcs/git
+	sys-devel/DPC++
+"
+
+DEPEND="
+	dev-libs/level-zero
+	dev-libs/opencl-icd-loader
+	dev-python/numpy[${PYTHON_USEDEP}]
+	dev-python/wheel[${PYTHON_USEDEP}]
+	sci-libs/oneDAL
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.14.0-dont-fetch-level-zero.patch"
+	"${FILESDIR}/${PN}-0.13.0-dont-fetch-pybind.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+	# DPC++ compiler required for full functionality
+	export CC="${ESYSROOT}/usr/lib/llvm/intel/bin/clang"
+	export CXX="${ESYSROOT}/usr/lib/llvm/intel/bin/clang++"
+	export DPCPPROOT="${ESYSROOT}/usr/lib/llvm/intel"
+
+	# For some reason this is required to build successfully
+	mkdir -p _skbuild/linux-x86_64-3.8/setuptools/lib.linux-x86_64-cpython-38/dpctl || die
+	cp dpctl/_version.py _skbuild/linux-x86_64-3.8/setuptools/lib.linux-x86_64-cpython-38/dpctl || die
+	mkdir -p _skbuild/linux-x86_64-3.9/setuptools/lib.linux-x86_64-cpython-39/dpctl || die
+	cp dpctl/_version.py _skbuild/linux-x86_64-3.9/setuptools/lib.linux-x86_64-cpython-39/dpctl || die
+	mkdir -p _skbuild/linux-x86_64-3.10/setuptools/lib.linux-x86_64-cpython-310/dpctl || die
+	cp dpctl/_version.py _skbuild/linux-x86_64-3.10/setuptools/lib.linux-x86_64-cpython-310/dpctl || die
+	mkdir -p _skbuild/linux-x86_64-3.11/setuptools/lib.linux-x86_64-cpython-311/dpctl || die
+	cp dpctl/_version.py _skbuild/linux-x86_64-3.11/setuptools/lib.linux-x86_64-cpython-311/dpctl || die
+
+	distutils-r1_python_prepare_all
+}

diff --git a/dev-python/dpctl/files/dpctl-0.13.0-dont-fetch-pybind.patch b/dev-python/dpctl/files/dpctl-0.13.0-dont-fetch-pybind.patch
new file mode 100644
index 000000000..b7dab5c75
--- /dev/null
+++ b/dev-python/dpctl/files/dpctl-0.13.0-dont-fetch-pybind.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 23ae1dd..e144e90 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,15 +26,7 @@ install(FILES ${_dpctl_capi_headers}
+ # Define CMAKE_INSTALL_xxx: LIBDIR, INCLUDEDIR
+ include(GNUInstallDirs)
+ 
+-# Fetch pybind11
+-include(FetchContent)
+-
+-FetchContent_Declare(
+-    pybind11
+-    URL https://github.com/pybind/pybind11/archive/refs/tags/v2.9.2.tar.gz
+-    URL_HASH SHA256=6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1
+-)
+-FetchContent_MakeAvailable(pybind11)
++include(/usr/share/cmake/pybind11/pybind11Config.cmake)
+ 
+ add_subdirectory(dpctl)
+ 


             reply	other threads:[~2022-12-12 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 15:16 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-26  5:19 [gentoo-commits] proj/sci:master commit in: dev-python/dpctl/files/, dev-python/dpctl/ Andrew Ammerlaan
2022-12-11 22:57 Andrew Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670849374.9e634fb794435f0c083e17567819bfe5161f5c52.andrewammerlaan@gentoo \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox