summaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
authorWilliam PC <w_calandrini[at]hotmail[dot]com>2022-11-06 10:27:16 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-11-12 22:32:56 +0700
commitb0d03c00d902d9cb08d4c3a12484ab86ee1959ee (patch)
tree165b81b5a20491ce9b4eae28c9cd605aad5e8c96 /academic
parent1b8d6f66731df6dc9344dea184ba11057e370e1e (diff)
downloadslackbuilds-b0d03c00d902d9cb08d4c3a12484ab86ee1959ee.tar.gz
academic/dwave-ocean-sdk: Added (D-Wave Ocean SDK)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/dwave-ocean-sdk/README23
-rw-r--r--academic/dwave-ocean-sdk/dwave-ocean-sdk.SlackBuild134
-rw-r--r--academic/dwave-ocean-sdk/dwave-ocean-sdk.info10
-rw-r--r--academic/dwave-ocean-sdk/slack-desc19
4 files changed, 186 insertions, 0 deletions
diff --git a/academic/dwave-ocean-sdk/README b/academic/dwave-ocean-sdk/README
new file mode 100644
index 0000000000..fc830b8659
--- /dev/null
+++ b/academic/dwave-ocean-sdk/README
@@ -0,0 +1,23 @@
+ Ocean is D-Wave's suite of tools for solving hard problems with
+quantum computers.
+
+ After installing you can run "dwave setup" to configure your
+system. If you don't have yet you shall get an API token after
+registering at dwavesystem's webpage.
+
+
+NOTE: slackbuilds.org, doesn't request to include packages that isn't
+necessary to build the package nonetheless there is a few packages
+required for running the dwave ocean sdk:
+ - python3-dateutil
+ - python3-plucky
+ - python-diskcache
+ - click
+ - homebase
+ - python3-pydantic
+ - PySocks
+ - rectangle-packer
+
+Other packages for development
+ - scipy3
+ - fasteners
diff --git a/academic/dwave-ocean-sdk/dwave-ocean-sdk.SlackBuild b/academic/dwave-ocean-sdk/dwave-ocean-sdk.SlackBuild
new file mode 100644
index 0000000000..f54c2a88fc
--- /dev/null
+++ b/academic/dwave-ocean-sdk/dwave-ocean-sdk.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+# Slackware build script for dwave-ocean-sdk
+
+# Copyright 2022 William PC - Seattle, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=dwave-ocean-sdk
+VERSION=${VERSION:-6.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# unpack components
+for source_file in $(ls $CWD/{dimod,dwave-{cloud-client,greedy,hybrid,inspector,neal,networkx,preprocessing,system,tabu},dwavebinarycsp,minorminer,penaltymodel,dwavebinarycsp}-*.tar.gz); do
+ dir_name=$(basename $source_file | sed 's/-[0-9].*//')
+ tar xvf $source_file -C $dir_name --strip-component 1
+done
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+
+PYVER=$( python3 -c 'import sys; print( "%d.%d" % sys.version_info[:2] )' )
+
+for source_file in $(ls $CWD/{dimod,dwave-{cloud-client,greedy,hybrid,inspector,neal,networkx,preprocessing,system,tabu},dwavebinarycsp,minorminer,penaltymodel,dwavebinarycsp}-*.tar.gz); do
+ dir_name=$(basename $source_file | sed 's/-[0-9].*//')
+ echo "Installing: $dir_name"
+ cd $dir_name
+
+ # set path to installed package modules
+ PYTHONPATH=$PKG/usr/lib${LIBDIRSUFFIX}/python$PYVER/site-packages \
+ python3 setup.py install --root=$PKG
+
+ # install documentation
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/$dir_name
+ cp -avL docs $PKG/usr/doc/$PRGNAM-$VERSION/$dir_name
+
+ # install examples if exists
+ if [ -d examples ]; then
+ mkdir -p $PKG/usr/share/$PRGNAM-$VERSION/$dir_name
+ cp -av examples $PKG/usr/share/$PRGNAM-$VERSION/$dir_name
+ fi
+ cd ..
+done
+
+# install dwave-ocean-sdk
+python3 setup.py install --root=$PKG
+
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CONTRIBUTING.rst LICENSE README.rst \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/academic/dwave-ocean-sdk/dwave-ocean-sdk.info b/academic/dwave-ocean-sdk/dwave-ocean-sdk.info
new file mode 100644
index 0000000000..b101b071e3
--- /dev/null
+++ b/academic/dwave-ocean-sdk/dwave-ocean-sdk.info
@@ -0,0 +1,10 @@
+PRGNAM="dwave-ocean-sdk"
+VERSION="6.0.0"
+HOMEPAGE="https://www.dwavesys.com/solutions-and-products/ocean"
+DOWNLOAD="https://github.com/dwavesystems/dwave-ocean-sdk/archive/6.0.0/dwave-ocean-sdk-6.0.0.tar.gz https://github.com/dwavesystems/dimod/archive/0.12.0/dimod-0.12.0.tar.gz https://github.com/dwavesystems/dwave-cloud-client/archive/0.10.3/dwave-cloud-client-0.10.3.tar.gz https://github.com/dwavesystems/dwave-greedy/archive/0.2.5/dwave-greedy-0.2.5.tar.gz https://github.com/dwavesystems/dwave-hybrid/archive/0.6.9/dwave-hybrid-0.6.9.tar.gz https://github.com/dwavesystems/dwave-inspector/archive/0.3.0/dwave-inspector-0.3.0.tar.gz https://github.com/dwavesystems/dwave-neal/archive/0.5.9/dwave-neal-0.5.9.tar.gz https://github.com/dwavesystems/dwave-networkx/archive/0.8.12/dwave-networkx-0.8.12.tar.gz https://github.com/dwavesystems/dwave-preprocessing/archive/0.5.0/dwave-preprocessing-0.5.0.tar.gz https://github.com/dwavesystems/dwave-system/archive/1.16.0/dwave-system-1.16.0.tar.gz https://github.com/dwavesystems/dwave-tabu/archive/0.4.5/dwave-tabu-0.4.5.tar.gz https://github.com/dwavesystems/dwavebinarycsp/archive/0.2.0/dwavebinarycsp-0.2.0.tar.gz https://github.com/dwavesystems/minorminer/archive/0.2.9/minorminer-0.2.9.tar.gz https://github.com/dwavesystems/penaltymodel/archive/1.0.2/penaltymodel-1.0.2.tar.gz"
+MD5SUM="23c03fae1a25ca9246b46fdf01e36a88 20dfa5a1cb6f06b3f928c0538f8a021c 00a192d9aa86c07ed7b5a42a2011d78f 8805c6bfa59c9b33d1e00e713e62fb98 406d8439c122b7e6f1dd6b3427f5c954 db97afcfbf90e989859737954f2786cc f01bae63001966835a0677e8b9b07ea8 5bd9d71bc6ebd723d1b741debc4abcef 68de0e23a6c8023f30f056e5aae2cbfb 450b6fbdf0829ec7e2dddec4e9d0b23b 861fe9eb8b0771b97c6240e228ac5e50 59fe60257afe4725a50dc7cf4fb7b972 de59a2d16a94ee5853938cbf19d61a6f 26c6d33ac5a17620c4d6de76985cc552"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="numpy3"
+MAINTAINER="William PC"
+EMAIL="w_calandrini[at]hotmail[dot]com"
diff --git a/academic/dwave-ocean-sdk/slack-desc b/academic/dwave-ocean-sdk/slack-desc
new file mode 100644
index 0000000000..8aad645d3e
--- /dev/null
+++ b/academic/dwave-ocean-sdk/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+dwave-ocean-sdk: dwave-ocean-sdk (D-Wave Ocean SDK)
+dwave-ocean-sdk:
+dwave-ocean-sdk:
+dwave-ocean-sdk:
+dwave-ocean-sdk: Ocean is D-Wave's suite of tools for solving hard problems with
+dwave-ocean-sdk: quantum computers.
+dwave-ocean-sdk:
+dwave-ocean-sdk:
+dwave-ocean-sdk:
+dwave-ocean-sdk:
+dwave-ocean-sdk: