From 557ad319346ddebc8ede68bba22a2e819be59540 Mon Sep 17 00:00:00 2001 From: leycec Date: Fri, 16 Feb 2018 02:13:56 -0500 Subject: [PATCH] dev-python/networkx: Added. NetworkX, a Python-centric graph theoretic framework, is now available as both live (i.e., 9999) and stable (i.e., 2.1) ebuilds. While official Portage ebuilds of NetworkX also exist, they are painfully obsolete as of this writing. --- .../instant-rst/instant-rst-9999.ebuild | 2 +- dev-python/instant-rst/metadata.xml | 3 - dev-python/networkx/Manifest | 1 + dev-python/networkx/metadata.xml | 27 ++++++ dev-python/networkx/networkx-2.1.ebuild | 1 + dev-python/networkx/networkx-9999.ebuild | 85 +++++++++++++++++++ 6 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 dev-python/networkx/Manifest create mode 100644 dev-python/networkx/metadata.xml create mode 120000 dev-python/networkx/networkx-2.1.ebuild create mode 100644 dev-python/networkx/networkx-9999.ebuild diff --git a/dev-python/instant-rst/instant-rst-9999.ebuild b/dev-python/instant-rst/instant-rst-9999.ebuild index 2b970af..d1a1fca 100644 --- a/dev-python/instant-rst/instant-rst-9999.ebuild +++ b/dev-python/instant-rst/instant-rst-9999.ebuild @@ -51,7 +51,7 @@ if [[ ${PV} == 9999 ]]; then SRC_URI="" KEYWORDS="" else - SRC_URI="mirror://pypi/i/${PN}/${P}.tar.gz" + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi diff --git a/dev-python/instant-rst/metadata.xml b/dev-python/instant-rst/metadata.xml index 653f6e8..43ce522 100644 --- a/dev-python/instant-rst/metadata.xml +++ b/dev-python/instant-rst/metadata.xml @@ -17,7 +17,4 @@ riv.vim (vim) + InstantRst (web server) + mars.css (theme) https://github.com/Rykka/instant-rst.py/blob/master/README.rst https://github.com/Rykka/instant-rst.py/issues - diff --git a/dev-python/networkx/Manifest b/dev-python/networkx/Manifest new file mode 100644 index 0000000..567d5dd --- /dev/null +++ b/dev-python/networkx/Manifest @@ -0,0 +1 @@ +DIST networkx-2.1.zip 1612593 SHA256 64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1 SHA512 61b819ccfdd38e009e5b363f4bf551f2924bbf751b078aab1b41da9faf4c6b0841f38750b96bd359d3aebefef01e65e88b4c43a378ec25bbd45283d92bdae678 WHIRLPOOL fc29881c1a54b9bd3c80174fd1b67bf97e72a1889935d5c33b022e0b32923faf8b3cdb55637f7bc6a24093f7fbeb766c7ff91dc9d76319202f11df042931b47f diff --git a/dev-python/networkx/metadata.xml b/dev-python/networkx/metadata.xml new file mode 100644 index 0000000..8b3a858 --- /dev/null +++ b/dev-python/networkx/metadata.xml @@ -0,0 +1,27 @@ + + + + + leycec@gmail.com + leycec + + + NetworkX is a Python-based package for the creation, manipulation, and + study of the structure, dynamics, and functions of complex networks. + The structure of a graph or network is encoded in the edges (connections, + links, ties, arcs, bonds) between nodes (vertices, sites, actors). If + unqualified, by graph we mean a simple undirected graph, i.e. no + self-loops and no multiple edges are allowed. By a network we usually + mean a graph with weights (fields, properties) on nodes and/or edges. + The potential audience for NetworkX includes: mathematicians, physicists, + biologists, computer scientists, social scientists. + + + networkx + networkx/networkx + + + Add support for dev-python/matplotlib + Enable SciPy backend + + diff --git a/dev-python/networkx/networkx-2.1.ebuild b/dev-python/networkx/networkx-2.1.ebuild new file mode 120000 index 0000000..f2b0f4f --- /dev/null +++ b/dev-python/networkx/networkx-2.1.ebuild @@ -0,0 +1 @@ +networkx-9999.ebuild \ No newline at end of file diff --git a/dev-python/networkx/networkx-9999.ebuild b/dev-python/networkx/networkx-9999.ebuild new file mode 100644 index 0000000..46d3907 --- /dev/null +++ b/dev-python/networkx/networkx-9999.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="Python tools to manipulate graphs and complex networks" +HOMEPAGE="http://networkx.github.io/ https://github.com/networkx/networkx" + +LICENSE="BSD" +SLOT="0" +IUSE="doc examples matplotlib scipy test" + +#FIXME: Add USE flags here and version requirements below for all optional +#dependencies supported by NetworkX. According to the "extras_require" key +#of the top-level "setup.py" file, these include: +# 'numpy', 'pandas', 'pydot', 'gdal', 'lxml' +REQUIRED_USE="${PYTHON_REQUIRED_USE} + doc? ( || ( $(python_gen_useflags -2) ) ) +" + +DEPEND="${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] ) + $(python_gen_cond_dep 'dev-python/numpydoc[${PYTHON_USEDEP}]' python2_7) + $(python_gen_cond_dep 'dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]' python2_7 python{3_3,3_4}) + ) + test? ( + ${COMMON_DEPEND} + dev-python/nose[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/pydot[${PYTHON_USEDEP}]' -2) + ) +" +RDEPEND="${PYTHON_DEPS} + >=dev-python/decorator-4.1.0[${PYTHON_USEDEP}] + examples? ( + ${COMMON_DEPEND} + dev-python/pygraphviz[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ) + matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] ) + scipy? ( sci-libs/scipy[${PYTHON_USEDEP}] ) +" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/networkx/networkx" + EGIT_BRANCH="master" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip" + KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +python_prepare_all() { + # Avoid d'loading of file objects.inv from 2 sites of python docs + sed -e "s/'sphinx.ext.intersphinx', //" -i doc/conf.py || die '"sed" failed.' + distutils-r1_python_prepare_all +} + +python_compile_all() { + if use doc; then + python_setup -2 + emake -C doc html + fi +} + +python_test() { + virtx nosetests -vv || die '"nosetests" failed.' +} + +python_install_all() { + use doc && local HTML_DOCS=( doc/build/html/. ) + use examples && dodoc -r examples + + distutils-r1_python_install_all +}