[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+



[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2015-12-14 Thread Justin Lecher
commit: 10671eba99fe5fac143fcd8f452a1eb731be54f7
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Dec 14 09:11:32 2015 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Dec 14 09:11:37 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10671eba

dev-python/cvxopt: Version Bump

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=521210

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher  gentoo.org>

 dev-python/cvxopt/Manifest   |   1 +
 dev-python/cvxopt/cvxopt-1.1.8.ebuild| 107 ++
 dev-python/cvxopt/files/cvxopt-1.1.8-setup.patch | 136 +++
 3 files changed, 244 insertions(+)

diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
index 4f7f06c..b57d8cf 100644
--- a/dev-python/cvxopt/Manifest
+++ b/dev-python/cvxopt/Manifest
@@ -1 +1,2 @@
 DIST cvxopt-1.1.6.tar.gz 3352996 SHA256 
7b4ccf3ed896dde6624623431c0b1f5e32d874384329ed716f51babcbf416227 SHA512 
b9f5fd7870412423b60068d205efb99d3630012509cb659fb67a10d6175906768846d7c906cf2fcac4be29afd558619b71e2dca730041329195a2365dd1d722c
 WHIRLPOOL 
d43cf090ee0396a77851fb71e6e34c980152bccdd5fdb3ecc53d0a464a505ac87a1e7198d313ec669443970bcf8a2d616f03c2f861b7df2f620bd583a97ea140
+DIST cvxopt-1.1.8.tar.gz 5354013 SHA256 
c96f8d01ae31a5bdec36a65b0587f50cfbf8139335adb70442350a8042da2025 SHA512 
fdf047f203275e687c51b88575639ab0383207f8748969939ecf2939f9a2acc9f5d0e97c68377466fce81eb979b5eb058834f75134cc56df5dbb01805cb98c93
 WHIRLPOOL 
65c8a246e03a7136c2bce3c7ef831f9f82c4cc84b7a1e5db6a2643127ea9164c35782fb1013c0eaf7ac190d036887a131c705fa56b78bda179792eca9d016d8b

diff --git a/dev-python/cvxopt/cvxopt-1.1.8.ebuild 
b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
new file mode 100644
index 000..9861448
--- /dev/null
+++ b/dev-python/cvxopt/cvxopt-1.1.8.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit distutils-r1 eutils toolchain-funcs
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://cvxopt.org/";
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="
+   virtual/blas
+   virtual/cblas
+   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:0= )
+   gsl? ( sci-libs/gsl:0= )"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   doc? ( dev-python/sphinx )"
+
+python_prepare_all(){
+   epatch "${FILESDIR}"/${P}-setup.patch
+
+   has_version ">=sci-mathematics/glpk-4.49" && \
+   epatch "${FILESDIR}"/${PN}-1.1.6-glpk449.patch
+
+   rm -r src/C/SuiteSparse*/ || die
+
+   pkg_lib() {
+   local pkg=$(echo $1 | tr '[:lower:]' '[:upper:]')
+   local libs="$($(tc-getPKG_CONFIG) --libs-only-l $1 | \
+   sed -e 's:[ ]-l*\(pthread\|m\)\([ ]\|$\)::g' -e 's:[ 
]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-l\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local libdir="$($(tc-getPKG_CONFIG) --libs-only-L $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   local incdir="$($(tc-getPKG_CONFIG) --cflags-only-I $1 | \
+   sed -e 's:[ ]*$::' | \
+   tr ' ' '\n' | sort -u | sed -e "s:^-L\(.*\):'\1':g" | \
+   tr '\n' ',' | sed -e 's:,$::')"
+   sed -i \
+   -e "/${pkg}_LIB[ ]*=/s:\(.*[ ]*=[ 
]*\[\).*${1}.*:\1${libs}\]:" \
+   -e "s:\(${pkg}_INC_DIR[ ]*=\).*$:\1 ${incdir}:" \
+   -e "s:\[ BLAS_LIB_DIR \]:\[ ${libdir} \]:g" \
+   setup.py || die
+   }
+
+   use_cvx() {
+   local flag=$1
+   if use ${flag} ; then
+   # Switch to ^^ when we switch to EAPI=6.
+   #local uflag=${flag^^}
+   local uflag=$(tr '[:lower:]' '[:upper:]' <<<"${flag}")
+   sed -i \
+   -e "s/\(BUILD_${uflag} =\) 0/\1 1/" \
+   setup.py || die
+   fi
+   }
+
+   pkg_lib blas
+   pkg_lib lapack
+
+   use_cvx gsl
+   use_cvx fftw
+   use_cvx glpk
+   use_cvx dsdp
+
+   sed \
+   -e '/SUITESPARSE_EXT_LIB/s:0:1:g' \
+   -i setup.py || die
+
+   distutils-r1_python

[gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/

2022-05-07 Thread Michael Orlitzky
commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Sat May  7 16:57:06 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Sat May  7 16:57:19 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50

dev-python/cvxopt: patch versioneer.py to fix the build.

Michał Górny fixed this upstream in versioneer itself, I just
backported his commit to cvxopt's copy of versioneer.py.

Closes: https://bugs.gentoo.org/840999
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 dev-python/cvxopt/cvxopt-1.3.0.ebuild  |  2 ++
 .../files/cvxopt-1.3.0-versioneer-buildfix.patch   | 33 ++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild 
b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
 distutils_enable_sphinx doc/source --no-autodoc
 distutils_enable_tests pytest
 

diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch 
b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index ..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+  https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
 b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+   cfg.versionfile_build)
++if not os.path.exists(target_versionfile):
++print(f"Warning: {target_versionfile} does not exist, 
skipping "
++  "version update. This can happen if you are running 
build_ext "
++  "without first running build_py.")
++return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+-- 
+2.35.1
+