Skip to content

Commit

Permalink
Merge branch 'vbraun' for 10.2.beta9
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwifb committed Oct 31, 2023
2 parents 1e33846 + a7d3e50 commit 7a2c6ac
Show file tree
Hide file tree
Showing 32 changed files with 427 additions and 184 deletions.
1 change: 1 addition & 0 deletions dev-python/cvxopt/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST cvxopt-1.3.2.gh.tar.gz 4095027 BLAKE2B ad4dfba1fe9c5be700ba61268e9d245355493c0334688b7a08bd4b5c4127da7a276cc660a1c1f4fe4df2359f9d2a8e3c4907d57d23c29d8caaf0329f6834cc30 SHA512 a6f9006b8b83445d781b1ba876e5ecefe724cf8666f47744b010e9c61fa1786dbd6233459a6e6a1a333ef9ac075d280076b2aeee3a2636d27541a615c5607b34
180 changes: 180 additions & 0 deletions dev-python/cvxopt/cvxopt-1.3.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1
PYTHON_COMPAT=( python3_{10..12} )

inherit distutils-r1 toolchain-funcs

DESCRIPTION="Python package for convex optimization"
HOMEPAGE="
https://cvxopt.org/
https://github.com/cvxopt/cvxopt/
https://pypi.org/project/cvxopt/
"
# no sdist, as of 1.3.1
SRC_URI="
https://github.com/${PN}/${PN}/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="+dsdp examples fftw +glpk gsl"

DEPEND="
virtual/blas
virtual/lapack
sci-libs/amd:0=
sci-libs/cholmod:0=
sci-libs/colamd:0=
sci-libs/suitesparseconfig:0=
sci-libs/umfpack:0=
dsdp? ( sci-libs/dsdp:0= )
fftw? ( sci-libs/fftw:3.0= )
glpk? ( >=sci-mathematics/glpk-4.49:0= )
gsl? ( sci-libs/gsl:0= )
"
RDEPEND="
${DEPEND}
"
BDEPEND="
>=dev-python/setuptools-scm-6.2[${PYTHON_USEDEP}]
virtual/pkgconfig
"

distutils_enable_sphinx doc/source \
dev-python/sphinx-rtd-theme
distutils_enable_tests pytest

# The BLAS_LIB and LAPACK_LIB variables (among others) in cvxopt's
# setup.py are passed in as colon-delimited strings. So, for example,
# if your blas "l" flags are "-lblas -lcblas", then cvxopt wants
# "blas;cblas" for BLAS_LIB.
#
# The following function takes a flag type ("l", "L", or "I") as its
# first argument and a list of packages as its remaining arguments. It
# outputs a list of libraries, library paths, or include paths,
# respectively, for the given packages, retrieved using pkg-config and
# deduplicated, in the appropriate format.
#
cvxopt_output() {
local FLAGNAME="${1}"
shift
local PACKAGES="${@}"

local PKGCONFIG_MODE
case "${FLAGNAME}" in
l) PKGCONFIG_MODE="--libs-only-l";;
L) PKGCONFIG_MODE="--libs-only-L";;
I) PKGCONFIG_MODE="--cflags-only-I";;
*) echo "invalid flag name: ${FLAGNAME}"; exit 1;;
esac

local CVXOPT_OUTPUT=""
local PKGCONFIG_ITEM
for PKGCONFIG_ITEM in $($(tc-getPKG_CONFIG) ${PKGCONFIG_MODE} ${PACKAGES})
do
# First strip off the leading "-l", "-L", or "-I", and replace
# it with a semicolon...
PKGCONFIG_ITEM=";${PKGCONFIG_ITEM#-${FLAGNAME}}"

# Now check to see if this element is already present in the
# list, and skip it if it is. This eliminates multiple entries
# from winding up in the list when multiple package arguments are
# passed to this function.
if [[ "${CVXOPT_OUTPUT}" != "${CVXOPT_OUTPUT%${PKGCONFIG_ITEM}}" ]]
then
# It was already the last entry in the list, so skip it.
continue
elif [[ "${CVXOPT_OUTPUT}" != "${CVXOPT_OUTPUT%${PKGCONFIG_ITEM};*}" ]]
then
# It was an earlier entry in the list. These two cases are
# separate to ensure that we can e.g. find ";m" at the end
# of the list, but that we don't find ";metis" in the process.
continue
fi

# It isn't in the list yet, so append it.
CVXOPT_OUTPUT+="${PKGCONFIG_ITEM}"
done

# Strip the leading ";" from ";foo;bar" before output.
echo "${CVXOPT_OUTPUT#;}"
}

src_configure() {
# Mandatory dependencies.
export CVXOPT_BLAS_LIB="$(cvxopt_output l blas)"
export CVXOPT_BLAS_LIB_DIR="${EPREFIX}/usr/$(get_libdir);$(cvxopt_output L blas)"
export CVXOPT_LAPACK_LIB="$(cvxopt_output l lapack)"
export CVXOPT_SUITESPARSE_LIB_DIR="${EPREFIX}/usr/$(get_libdir);$(cvxopt_output L umfpack cholmod amd colamd suitesparseconfig)"

# Most of these CVXOPT_* variables can be blank or have "empty"
# entries and the resulting command-line with e.g. "-L -L/some/path"
# won't hurt anything. The INC_DIR variables, however, cause
# problems, because at least gcc doesn't like a bare "-I". We
# pre-populate these variable with something safe so that setup.py
# doesn't look in the wrong place if pkg-config doesn't return any
# extra -I directories. This is
#
# https://github.com/cvxopt/cvxopt/issues/167
#
CVXOPT_SUITESPARSE_INC_DIR="${EPREFIX}/usr/include"
local SUITESPARSE_LOCAL_INCS="$(cvxopt_output I umfpack cholmod amd colamd suitesparseconfig)"
if [[ -n "${SUITESPARSE_LOCAL_INCS}" ]]; then
CVXOPT_SUITESPARSE_INC_DIR+=";${SUITESPARSE_LOCAL_INCS}"
fi
export CVXOPT_SUITESPARSE_INC_DIR

# optional dependencies
if use dsdp; then
# no pkg-config file at the moment
export CVXOPT_BUILD_DSDP=1
export CVXOPT_DSDP_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
export CVXOPT_DSDP_INC_DIR="${EPREFIX}/usr/include"
fi

if use fftw; then
export CVXOPT_BUILD_FFTW=1
export CVXOPT_FFTW_LIB_DIR="${EPREFIX}/usr/$(get_libdir);$(cvxopt_output L fftw3)"
CVXOPT_FFTW_INC_DIR="${EPREFIX}/usr/include"
FFTW_LOCAL_INCS="$(cvxopt_output I fftw3)"
if [[ -n "${FFTW_LOCAL_INCS}" ]]; then
CVXOPT_FFTW_INC_DIR+=";${FFTW_LOCAL_INCS}"
fi
export CVXOPT_FFTW_INC_DIR
fi

if use glpk; then
# no pkg-config file at the moment
export CVXOPT_BUILD_GLPK=1
export CVXOPT_GLPK_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
export CVXOPT_GLPK_INC_DIR="${EPREFIX}/usr/include"
fi

if use gsl; then
export CVXOPT_BUILD_GSL=1
export CVXOPT_GSL_LIB_DIR="${EPREFIX}/usr/$(get_libdir);$(cvxopt_output L gsl)"
CVXOPT_GSL_INC_DIR="${EPREFIX}/usr/include"
GSL_LOCAL_INCS="$(cvxopt_output I gsl)"
if [[ -n "${GSL_LOCAL_INCS}" ]]; then
CVXOPT_GSL_INC_DIR+=";${GSL_LOCAL_INCS}"
fi
export CVXOPT_GSL_INC_DIR
fi

export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
}

python_install_all() {
distutils-r1_python_install_all
if use examples; then
dodoc -r examples
docompress -x "/usr/share/doc/${PF}/examples"
fi
}
23 changes: 23 additions & 0 deletions dev-python/cvxopt/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<longdescription lang="en">
CVXOPT is a software for convex optimization based on
the Python programming language. Its main purpose is to make the
development of software for convex optimization applications
straightforward.
</longdescription>
<use>
<flag name="dsdp">Use interior point library
<pkg>sci-libs/dsdp</pkg></flag>
<flag name="glpk">Use GNU Linear Programming Kit
<pkg>sci-mathematics/glpk</pkg></flag>
</use>
<upstream>
<remote-id type="github">cvxopt/cvxopt</remote-id>
<remote-id type="pypi">cvxopt</remote-id>
</upstream>
</pkgmetadata>
1 change: 0 additions & 1 deletion dev-python/cypari2/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DIST cypari2-2.1.3.tar.gz 127289 BLAKE2B 0347b5d661fd7411b8f39f054df224f13949164d1ca681a36a2cdab8541dc205b8f252c29b27ad328d78ea29028a70c0d00c743ee55c3e49377d0c7f46c874cf SHA512 eb8b60af578f6234af3cc65e13270365516a2e3a750183474cbc8990aaf4ac448d27f1508c0b47b42ac3fb11f8387ea821e6a29d4d866587ec835d49dc087687
DIST cypari2-2.1.4.gh.tar.gz 127038 BLAKE2B 0d4998841a9a630ea062d7096845771a9a250ed66b68f99988ded6442724559089e8dbbce13ef5c6ad467705c65b2ac9fc5889fa9c40b9665083af558280b81a SHA512 b5926281037aebb899c1a433a0ca106cdfafcb8cb7abb863268ff8151dbc52ee21dbe1d09dde632de1640a4cc4d37f59bebb0e379d61ac2fbdf9fffcf3ba4775
39 changes: 0 additions & 39 deletions dev-python/cypari2/cypari2-2.1.4.ebuild

This file was deleted.

1 change: 0 additions & 1 deletion dev-python/cysignals/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DIST cysignals-1.11.2.tar.gz 99014 BLAKE2B ad292a2873a3c88191c731a9370c8cc58f95a261a76882b9af19cfb2b41500c66d5ef79f0d91e647a0c751be22bb9cace8a472563d58721e641b2a44f07bd3be SHA512 8f02ed2cb9c454e3b4e5cf186ccacb8eeb1dc9e30b1643085c603e0ef41d4ebb91d303188251acb76e0566d924ac00ef134646c92e96f36abfeeaa7a8dd33797
DIST cysignals-1.11.4.tar.gz 105100 BLAKE2B c21c5cae69332885dd4b9f13d0fbe9ab836466dd699f0d51908d129107ce4922f4076fafa8dce3650983fd69d25182464f9831545a8da3535699d36d198ec6a7 SHA512 b083a62bcca71634cdd21ca6c8d1363e7754ed97d6f2ad0280b0ae97fdf1264be3dc202acf67added4c12a0815420d9641269da1212b83472ea304883d3b85ab
26 changes: 0 additions & 26 deletions dev-python/cysignals/cysignals-1.11.4.ebuild

This file was deleted.

1 change: 0 additions & 1 deletion dev-python/fpylll/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DIST fpylll-0.5.9.tar.gz 1083488 BLAKE2B 9797474b186bf223efd866cadb87f22a546bd2440e4cbd7c35c8f6fa6bfa4c4dbcdc817577a83571c41e6d6a355c4270ab39c6f9ed0c0ff85ebc6a270a87a063 SHA512 e5df1ebc1e1d7e9ce48ad15399f06e2713b263679bc5755fcc27ab6174d2e209d21077252227de5a34ebddb214488d318c8d489f1e942996785f5648709a06f6
DIST fpylll-0.6.0.tar.gz 1084736 BLAKE2B de4fc2ef762a1dc931e728cae4857da34828fb929eec0cf05c076bce5b3f7475492871d016d94f9cac4515a04a7f652440511f4ba8f1b724c351a403d5375ea0 SHA512 e21ed21362cb9256dbc828f4d628602cd8b5c1a8640116f1c137e85056cedc89a73cab58c28ea12212ee92f4ed36b99796c5dbd30c55159baf9b33770b1a9aab
34 changes: 0 additions & 34 deletions dev-python/fpylll/fpylll-0.6.0.ebuild

This file was deleted.

2 changes: 1 addition & 1 deletion dev-python/jupyter-jsmol/jupyter-jsmol-2022.1.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi

Expand Down
2 changes: 1 addition & 1 deletion dev-python/jupyter-sphinx/jupyter-sphinx-0.3.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

EAPI=8

PYTHON_COMPAT=( python3_{10..11} )
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi

Expand Down
1 change: 0 additions & 1 deletion dev-python/memory_allocator/Manifest

This file was deleted.

26 changes: 0 additions & 26 deletions dev-python/memory_allocator/memory_allocator-0.1.3.ebuild

This file was deleted.

12 changes: 0 additions & 12 deletions dev-python/memory_allocator/metadata.xml

This file was deleted.

1 change: 0 additions & 1 deletion dev-python/primecountpy/Manifest

This file was deleted.

12 changes: 0 additions & 12 deletions dev-python/primecountpy/metadata.xml

This file was deleted.

Loading

0 comments on commit 7a2c6ac

Please sign in to comment.