Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
6 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST networkx-2.1.zip 1612593 SHA256 64272ca418972b70a196cb15d9c85a5a6041f09a2f32e0d30c0255f25d458bb1 SHA512 61b819ccfdd38e009e5b363f4bf551f2924bbf751b078aab1b41da9faf4c6b0841f38750b96bd359d3aebefef01e65e88b4c43a378ec25bbd45283d92bdae678 WHIRLPOOL fc29881c1a54b9bd3c80174fd1b67bf97e72a1889935d5c33b022e0b32923faf8b3cdb55637f7bc6a24093f7fbeb766c7ff91dc9d76319202f11df042931b47f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>leycec@gmail.com</email> | ||
<name>leycec</name> | ||
</maintainer> | ||
<longdescription lang="en"> | ||
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. | ||
</longdescription> | ||
<upstream> | ||
<remote-id type="pypi">networkx</remote-id> | ||
<remote-id type="github">networkx/networkx</remote-id> | ||
</upstream> | ||
<use> | ||
<flag name="matplotlib">Add support for dev-python/matplotlib</flag> | ||
<flag name="scipy">Enable SciPy backend</flag> | ||
</use> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
networkx-9999.ebuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |