public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-python/matplotlib: matplotlib-1.3.1.ebuild ChangeLog metadata.xml matplotlib-9999.ebuild
@ 2013-12-12 14:30 Justin Lecher (jlec)
  0 siblings, 0 replies; only message in thread
From: Justin Lecher (jlec) @ 2013-12-12 14:30 UTC (permalink / raw
  To: gentoo-commits

jlec        13/12/12 14:30:20

  Modified:             ChangeLog metadata.xml
  Added:                matplotlib-1.3.1.ebuild matplotlib-9999.ebuild
  Log:
  dev-python/matplotlib: Version Bump, #490796; Add live ebuild; wrap commands with virtualx.eclass, add missing PYTON_USEDEPs; add missing latex deps, #462252; set REQUIERED_USE for test so that all backends are tested
  
  (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)

Revision  Changes    Path
1.162                dev-python/matplotlib/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.162&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.162&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?r1=1.161&r2=1.162

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -r1.161 -r1.162
--- ChangeLog	7 Dec 2013 19:18:30 -0000	1.161
+++ ChangeLog	12 Dec 2013 14:30:20 -0000	1.162
@@ -1,6 +1,16 @@
 # ChangeLog for dev-python/matplotlib
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.161 2013/12/07 19:18:30 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.162 2013/12/12 14:30:20 jlec Exp $
+
+*matplotlib-9999 (12 Dec 2013)
+*matplotlib-1.3.1 (12 Dec 2013)
+
+  12 Dec 2013; Justin Lecher <jlec@gentoo.org> +matplotlib-1.3.1.ebuild,
+  +matplotlib-9999.ebuild, +files/matplotlib-1.3.1-unbundle-agg.patch,
+  +files/matplotlib-1.3.1-unbundle-pycxx.patch, metadata.xml:
+  Version Bump, #490796; Add live ebuild; wrap commands with virtualx.eclass,
+  add missing PYTON_USEDEPs; add missing latex deps, #462252; set REQUIERED_USE
+  for test so that all backends are tested
 
   07 Dec 2013; Pacho Ramos <pacho@gentoo.org> matplotlib-1.3.0.ebuild:
   x86 stable, bug #488738



1.12                 dev-python/matplotlib/metadata.xml

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/metadata.xml?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/metadata.xml?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/metadata.xml?r1=1.11&r2=1.12

Index: metadata.xml
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/metadata.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- metadata.xml	10 May 2013 03:42:38 -0000	1.11
+++ metadata.xml	12 Dec 2013 14:30:20 -0000	1.12
@@ -1,18 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<herd>python</herd>
-<longdescription lang="en">
+  <herd>python</herd>
+  <longdescription lang="en">
   matplotlib is an interactive library for plotting and doing basic
   data analysis in python with a syntax similar to matlab. It provides a
   variety of backends and hard copy formats for almost ready
   publication plots.
 </longdescription>
-<use>
-  <flag name="excel">Pull <pkg>dev-python/xlwt</pkg> for the exceltools toolkit</flag>
-  <flag name="gtk3">Use <pkg>x11-libs/gtk+:3</pkg> instead of <pkg>x11-libs/gtk+:2</pkg></flag>
-</use>
-<upstream>
-  <remote-id type="pypi">matplotlib</remote-id>
-</upstream>
+  <use>
+    <flag name="excel">Pull <pkg>dev-python/xlwt</pkg> for the exceltools toolkit</flag>
+    <flag name="gtk3">Use <pkg>x11-libs/gtk+:3</pkg> instead of <pkg>x11-libs/gtk+:2</pkg></flag>
+    <flag name="pyside">Qt support via <pkg>dev-python/pyside</pkg></flag>
+  </use>
+  <upstream>
+    <remote-id type="pypi">matplotlib</remote-id>
+  </upstream>
 </pkgmetadata>



1.1                  dev-python/matplotlib/matplotlib-1.3.1.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.1.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.1.ebuild?rev=1.1&content-type=text/plain

Index: matplotlib-1.3.1.ebuild
===================================================================
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.1.ebuild,v 1.1 2013/12/12 14:30:20 jlec Exp $

EAPI=5

PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )

PYTHON_REQ_USE='tk?'

inherit distutils-r1 eutils flag-o-matic virtualx

DESCRIPTION="Pure python plotting library with matlab like syntax"
HOMEPAGE="http://matplotlib.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

SLOT="0"
# Main license: matplotlib
# Some modules: BSD
# matplotlib/backends/qt4_editor: MIT
# Fonts: BitstreamVera, OFL-1.1
LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
KEYWORDS="~amd64 ~arm ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="cairo doc excel examples fltk gtk gtk3 latex pyside qt4 test tk wxwidgets"

# #456704 -- a lot of py2-only deps
PY2_USEDEP=$(python_gen_usedep 'python2*')
PY32_USEDEP=$(python_gen_usedep python3_2)
PY3_USEDEP=$(python_gen_usedep python{3_2,3_3})
COMMON_DEPEND="
	dev-python/numpy[${PYTHON_USEDEP}]
	dev-python/python-dateutil:0[${PYTHON_USEDEP}]
	dev-python/pytz[${PYTHON_USEDEP}]
	dev-python/six[${PYTHON_USEDEP}]
	media-fonts/stix-fonts
	media-libs/freetype:2
	media-libs/libpng:0
	gtk? ( dev-python/pygtk[${PY2_USEDEP}] )
	wxwidgets? ( >=dev-python/wxpython-2.8[${PY2_USEDEP}] )"

# internal copy of pycxx highly patched
#	dev-python/pycxx

DEPEND="${COMMON_DEPEND}
	virtual/pkgconfig
	doc? (
		app-text/dvipng
		virtual/python-imaging[${PYTHON_USEDEP}]
		dev-python/ipython[${PYTHON_USEDEP}]
		dev-python/numpydoc[${PY2_USEDEP}]
		dev-python/xlwt[${PY2_USEDEP}]
		dev-python/sphinx[${PYTHON_USEDEP}]
		dev-texlive/texlive-latexextra
		dev-texlive/texlive-fontsrecommended
		dev-texlive/texlive-latexrecommended
		media-gfx/graphviz[cairo]
	)
	test? ( dev-python/nose[${PYTHON_USEDEP}] )"

RDEPEND="${COMMON_DEPEND}
	dev-python/pyparsing[${PYTHON_USEDEP}]
	cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
	excel? ( dev-python/xlwt[${PY2_USEDEP}] )
	fltk? ( dev-python/pyfltk[${PY2_USEDEP}] )
	gtk3? (
		dev-python/pygobject:3[${PYTHON_USEDEP}]
		x11-libs/gtk+:3[introspection] )
	latex? (
		virtual/latex-base
		app-text/ghostscript-gpl
		app-text/dvipng
		app-text/poppler[utils]
		dev-texlive/texlive-fontsrecommended
		dev-texlive/texlive-latexextra
		dev-texlive/texlive-xetex
	)
	pyside? ( dev-python/pyside[X,${PY2_USEDEP},${PY32_USEDEP}] )
	qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )"

PY2_FLAGS="|| ( $(python_gen_useflags python2*) )"
PY32_FLAGS="|| ( $(python_gen_useflags python3_2) )"
REQUIRED_USE="
	doc? ( ${PY2_FLAGS} )
	excel? ( ${PY2_FLAGS} )
	fltk? ( ${PY2_FLAGS} )
	gtk? ( ${PY2_FLAGS} )
	pyside? ( ${PY2_FLAGS} ${PY32_FLAGS} )
	wxwidgets? ( ${PY2_FLAGS} )
	test? (
		cairo fltk latex pyside qt4 tk wxwidgets
		|| ( gtk gtk3 )
		)"

RESTRICT="mirror"

# A few C++ source files are written to srcdir.
# Other than that, the ebuild shall be fit for out-of-source build.
DISTUTILS_IN_SOURCE_BUILD=1

use_setup() {
	local uword="${2:-${1}}"
	if use ${1}; then
		echo "${uword} = True"
		echo "${uword}agg = True"
	else
		echo "${uword} = False"
		echo "${uword}agg = False"
	fi
}

python_prepare_all() {
# Generates test failures, but fedora does it
#	local PATCHES=(
#		"${FILESDIR}"/${P}-unbundle-pycxx.patch
#		"${FILESDIR}"/${P}-unbundle-agg.patch
#	)
#	rm -r agg24 CXX || die
#	rm -r agg24 || die

	sed \
		-e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
		-i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
		|| die "sed pyparsing failed"

	# suggested by upstream
	sed \
		-e '/tol/s:32:35:g' \
		-i lib/matplotlib/tests/test_mathtext.py || die

	distutils-r1_python_prepare_all
}

python_configure_all() {
	append-flags -fno-strict-aliasing
}

python_configure() {
	mkdir -p "${BUILD_DIR}" || die

	# create setup.cfg (see setup.cfg.template for any changes).

	# common switches.
	cat > "${BUILD_DIR}"/setup.cfg <<-EOF
		[directories]
		basedirlist = ${EPREFIX}/usr
		[provide_packages]
		pytz = False
		dateutil = False
		[gui_support]
		agg = True
		$(use_setup cairo)
		$(use_setup pyside)
		$(use_setup qt4)
		$(use_setup tk)
	EOF

	if use gtk3 && use cairo; then
		echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
	else
		echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
	fi

	if $(python_is_python3); then
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
			six = True
			fltk = False
			fltkagg = False
			gtk = False
			gtkagg = False
			wx = False
			wxagg = False
		EOF
	else
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
			six = False
			$(use_setup fltk)
			$(use_setup gtk)
			$(use_setup gtk3)
			$(use_setup wxwidgets wx)
		EOF
	fi
}

wrap_setup() {
	local MPLSETUPCFG=${BUILD_DIR}/setup.cfg
	export MPLSETUPCFG

	# Note: remove build... if switching to out-of-source build
	"${@}" build --build-lib="${BUILD_DIR}"/build/lib
}

python_compile() {
	VIRTUALX_COMMAND="wrap_setup"
	virtualmake distutils-r1_python_compile
}

python_compile_all() {
	if use doc; then
		cd doc || die

		# necessary for in-source build
		local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}

		unset DISPLAY # bug #278524
		VARTEXFONTS="${T}"/fonts \
		"${PYTHON}" ./make.py --small html || die
	fi
}

python_test() {
	VIRTUALX_COMMAND="wrap_setup"
	virtualmake distutils_install_for_testing

	cd "${TMPDIR}" || die
	VIRTUALX_COMMAND="${PYTHON}"
	virtualmake -c "
import sys, matplotlib as m
sys.exit(0 if m.test(verbosity=2) else 1)
" || die "Tests fail with ${EPYTHON}"
}

python_install() {
	wrap_setup distutils-r1_python_install
}

python_install_all() {
	use doc && local HTML_DOCS=( doc/build/html/. )

	distutils-r1_python_install_all

	if use examples; then
		dodoc -r examples
		docompress -x /usr/share/doc/${PF}/examples
	fi
}



1.1                  dev-python/matplotlib/matplotlib-9999.ebuild

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-9999.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-9999.ebuild?rev=1.1&content-type=text/plain

Index: matplotlib-9999.ebuild
===================================================================
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-9999.ebuild,v 1.1 2013/12/12 14:30:20 jlec Exp $

EAPI=5

PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )

PYTHON_REQ_USE='tk?'

inherit distutils-r1 eutils flag-o-matic git-r3 virtualx

DESCRIPTION="Pure python plotting library with matlab like syntax"
HOMEPAGE="http://matplotlib.org/"
SRC_URI=""
EGIT_REPO_URI="https://github.com/matplotlib/matplotlib.git"

SLOT="0"
# Main license: matplotlib
# Some modules: BSD
# matplotlib/backends/qt4_editor: MIT
# Fonts: BitstreamVera, OFL-1.1
LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
KEYWORDS=""
IUSE="cairo doc excel examples fltk gtk gtk3 latex pyside qt4 test tk wxwidgets"

# #456704 -- a lot of py2-only deps
PY2_USEDEP=$(python_gen_usedep 'python2*')
PY32_USEDEP=$(python_gen_usedep python3_2)
PY3_USEDEP=$(python_gen_usedep python{3_2,3_3})
COMMON_DEPEND="
	dev-python/numpy[${PYTHON_USEDEP}]
	dev-python/python-dateutil:0[${PYTHON_USEDEP}]
	dev-python/pytz[${PYTHON_USEDEP}]
	dev-python/six[${PYTHON_USEDEP}]
	media-fonts/stix-fonts
	media-libs/freetype:2
	media-libs/libpng:0
	gtk? ( dev-python/pygtk[${PY2_USEDEP}] )
	wxwidgets? ( >=dev-python/wxpython-2.8[${PY2_USEDEP}] )"

# internal copy of pycxx highly patched
#	dev-python/pycxx

DEPEND="${COMMON_DEPEND}
	virtual/pkgconfig
	doc? (
		app-text/dvipng
		virtual/python-imaging[${PYTHON_USEDEP}]
		dev-python/ipython[${PYTHON_USEDEP}]
		dev-python/numpydoc[${PY2_USEDEP}]
		dev-python/xlwt[${PY2_USEDEP}]
		dev-python/sphinx[${PYTHON_USEDEP}]
		dev-texlive/texlive-latexextra
		dev-texlive/texlive-fontsrecommended
		dev-texlive/texlive-latexrecommended
		media-gfx/graphviz[cairo]
	)
	test? ( dev-python/nose[${PYTHON_USEDEP}] )"

RDEPEND="${COMMON_DEPEND}
	dev-python/pyparsing[${PYTHON_USEDEP}]
	cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
	excel? ( dev-python/xlwt[${PY2_USEDEP}] )
	fltk? ( dev-python/pyfltk[${PY2_USEDEP}] )
	gtk3? (
		dev-python/pygobject:3[${PYTHON_USEDEP}]
		x11-libs/gtk+:3[introspection] )
	latex? (
		virtual/latex-base
		app-text/ghostscript-gpl
		app-text/dvipng
		app-text/poppler[utils]
		dev-texlive/texlive-fontsrecommended
		dev-texlive/texlive-latexextra
		dev-texlive/texlive-xetex
	)
	pyside? ( dev-python/pyside[X,${PY2_USEDEP},${PY32_USEDEP}] )
	qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )"

PY2_FLAGS="|| ( $(python_gen_useflags python2*) )"
PY32_FLAGS="|| ( $(python_gen_useflags python3_2) )"
REQUIRED_USE="
	doc? ( ${PY2_FLAGS} )
	excel? ( ${PY2_FLAGS} )
	fltk? ( ${PY2_FLAGS} )
	gtk? ( ${PY2_FLAGS} )
	pyside? ( ${PY2_FLAGS} ${PY32_FLAGS} )
	wxwidgets? ( ${PY2_FLAGS} )
	test? (
		cairo fltk latex pyside qt4 tk wxwidgets
		|| ( gtk gtk3 )
		)"

RESTRICT="mirror"

# A few C++ source files are written to srcdir.
# Other than that, the ebuild shall be fit for out-of-source build.
DISTUTILS_IN_SOURCE_BUILD=1

use_setup() {
	local uword="${2:-${1}}"
	if use ${1}; then
		echo "${uword} = True"
		echo "${uword}agg = True"
	else
		echo "${uword} = False"
		echo "${uword}agg = False"
	fi
}

python_prepare_all() {
	sed \
		-e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
		-i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
		|| die "sed pyparsing failed"

	# suggested by upstream
	sed \
		-e '/tol/s:32:35:g' \
		-i lib/matplotlib/tests/test_mathtext.py || die

	distutils-r1_python_prepare_all
}

python_configure_all() {
	append-flags -fno-strict-aliasing
}

python_configure() {
	mkdir -p "${BUILD_DIR}" || die

	# create setup.cfg (see setup.cfg.template for any changes).

	# common switches.
	cat > "${BUILD_DIR}"/setup.cfg <<-EOF
		[directories]
		basedirlist = ${EPREFIX}/usr
		[provide_packages]
		pytz = False
		dateutil = False
		[gui_support]
		agg = True
		$(use_setup cairo)
		$(use_setup pyside)
		$(use_setup qt4)
		$(use_setup tk)
	EOF

	if use gtk3 && use cairo; then
		echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
	else
		echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
	fi

	if $(python_is_python3); then
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
			six = True
			fltk = False
			fltkagg = False
			gtk = False
			gtkagg = False
			wx = False
			wxagg = False
		EOF
	else
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
			six = False
			$(use_setup fltk)
			$(use_setup gtk)
			$(use_setup gtk3)
			$(use_setup wxwidgets wx)
		EOF
	fi
}

wrap_setup() {
	local MPLSETUPCFG=${BUILD_DIR}/setup.cfg
	export MPLSETUPCFG

	# Note: remove build... if switching to out-of-source build
	"${@}" build --build-lib="${BUILD_DIR}"/build/lib
}

python_compile() {
	VIRTUALX_COMMAND="wrap_setup"
	virtualmake distutils-r1_python_compile
}

python_compile_all() {
	if use doc; then
		cd doc || die

		# necessary for in-source build
		local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}

		unset DISPLAY # bug #278524
		VARTEXFONTS="${T}"/fonts \
		"${PYTHON}" ./make.py --small html || die
	fi
}

python_test() {
	VIRTUALX_COMMAND="wrap_setup"
	virtualmake distutils_install_for_testing

	cd "${TMPDIR}" || die
	VIRTUALX_COMMAND="${PYTHON}"
	virtualmake -c "
import sys, matplotlib as m
sys.exit(0 if m.test(verbosity=2) else 1)
" || die "Tests fail with ${EPYTHON}"
}

python_install() {
	wrap_setup distutils-r1_python_install
}

python_install_all() {
	use doc && local HTML_DOCS=( doc/build/html/. )

	distutils-r1_python_install_all

	if use examples; then
		dodoc -r examples
		docompress -x /usr/share/doc/${PF}/examples
	fi
}





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-12 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 14:30 [gentoo-commits] gentoo-x86 commit in dev-python/matplotlib: matplotlib-1.3.1.ebuild ChangeLog metadata.xml matplotlib-9999.ebuild Justin Lecher (jlec)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox