diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/networkx | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/networkx')
| -rw-r--r-- | dev-python/networkx/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/networkx/files/networkx-2.4-py38.patch | 84 | ||||
| -rw-r--r-- | dev-python/networkx/files/networkx-2.4-py39.patch | 46 | ||||
| -rw-r--r-- | dev-python/networkx/metadata.xml | 30 | ||||
| -rw-r--r-- | dev-python/networkx/networkx-2.4-r1.ebuild | 59 | ||||
| -rw-r--r-- | dev-python/networkx/networkx-2.4.ebuild | 59 |
6 files changed, 279 insertions, 0 deletions
diff --git a/dev-python/networkx/Manifest b/dev-python/networkx/Manifest new file mode 100644 index 000000000000..a5e05b0f2ba5 --- /dev/null +++ b/dev-python/networkx/Manifest @@ -0,0 +1 @@ +DIST networkx-2.4.tar.gz 1462338 BLAKE2B 90fd7d249f3b022dd9c861dd023881fd241cba0515e2e9991516c278a40b92ee03663eb2b15bd584f179c066529df0587293f9c9a211e7c526addf77fdaf5cd6 SHA512 38eabef56e3667b7fa85206ae01a0a8f5c71bfa2f324bc2490c433cb973508a03955183a0c58ae40390f86d6a4741135cdb426c4c15e53e2f123072f0cac1b89 diff --git a/dev-python/networkx/files/networkx-2.4-py38.patch b/dev-python/networkx/files/networkx-2.4-py38.patch new file mode 100644 index 000000000000..9ce3003d1042 --- /dev/null +++ b/dev-python/networkx/files/networkx-2.4-py38.patch @@ -0,0 +1,84 @@ +From 488e824439124f4dd52f8230c452a3df681b1bab Mon Sep 17 00:00:00 2001 +From: Steve Kowalik <steven@wedontsleep.org> +Date: Fri, 15 Nov 2019 13:48:33 +1100 +Subject: [PATCH] Fix test_numpy_type to pass under Python 3.8 + +readwrite.tests.test_gexf.TestGEXF.test_numpy_type failed under Python +3.8 due to ordering of XML attributes, handle it as per f75dbe8. Also +change travis to no longer allow failures under 3.8. + +Fixes #3720 +--- + .travis.yml | 2 -- + networkx/readwrite/tests/test_gexf.py | 51 ++++++++++++++++++++++++++- + 2 files changed, 50 insertions(+), 3 deletions(-) + +diff --git a/networkx/readwrite/tests/test_gexf.py b/networkx/readwrite/tests/test_gexf.py +index afc40111ce..f16504c047 100644 +--- a/networkx/readwrite/tests/test_gexf.py ++++ b/networkx/readwrite/tests/test_gexf.py +@@ -404,7 +404,8 @@ def test_numpy_type(self): + nx.set_node_attributes(G, {n: n for n in numpy.arange(4)}, 'number') + G[0][1]['edge-number'] = numpy.float64(1.1) + +- expected = """<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft"\ ++ if sys.version_info < (3, 8): ++ expected = """<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft"\ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation\ + ="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd"> + <meta lastmodifieddate="{}"> +@@ -449,6 +450,54 @@ def test_numpy_type(self): + <edge id="2" source="2" target="3" /> + </edges> + </graph> ++</gexf>""".format(time.strftime('%Y-%m-%d'), nx.__version__) ++ else: ++ expected = """<gexf xmlns="http://www.gexf.net/1.2draft"\ ++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation\ ++="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd"\ ++ version="1.2"> ++ <meta lastmodifieddate="{}"> ++ <creator>NetworkX {}</creator> ++ </meta> ++ <graph defaultedgetype="undirected" mode="static" name=""> ++ <attributes mode="static" class="edge"> ++ <attribute id="1" title="edge-number" type="float" /> ++ </attributes> ++ <attributes mode="static" class="node"> ++ <attribute id="0" title="number" type="int" /> ++ </attributes> ++ <nodes> ++ <node id="0" label="0"> ++ <attvalues> ++ <attvalue for="0" value="0" /> ++ </attvalues> ++ </node> ++ <node id="1" label="1"> ++ <attvalues> ++ <attvalue for="0" value="1" /> ++ </attvalues> ++ </node> ++ <node id="2" label="2"> ++ <attvalues> ++ <attvalue for="0" value="2" /> ++ </attvalues> ++ </node> ++ <node id="3" label="3"> ++ <attvalues> ++ <attvalue for="0" value="3" /> ++ </attvalues> ++ </node> ++ </nodes> ++ <edges> ++ <edge source="0" target="1" id="0"> ++ <attvalues> ++ <attvalue for="1" value="1.1" /> ++ </attvalues> ++ </edge> ++ <edge source="1" target="2" id="1" /> ++ <edge source="2" target="3" id="2" /> ++ </edges> ++ </graph> + </gexf>""".format(time.strftime('%Y-%m-%d'), nx.__version__) + obtained = '\n'.join(nx.generate_gexf(G)) + assert expected == obtained diff --git a/dev-python/networkx/files/networkx-2.4-py39.patch b/dev-python/networkx/files/networkx-2.4-py39.patch new file mode 100644 index 000000000000..7efe8998b35f --- /dev/null +++ b/dev-python/networkx/files/networkx-2.4-py39.patch @@ -0,0 +1,46 @@ +From 0cb12b33df48788c10fa21b326803ae66d74cbe6 Mon Sep 17 00:00:00 2001 +From: Jarrod Millman <jarrod.millman@gmail.com> +Date: Mon, 21 Oct 2019 00:56:04 -0700 +Subject: [PATCH] Remove unused imports + +--- + .travis.yml | 3 --- + networkx/algorithms/assortativity/connectivity.py | 2 -- + networkx/algorithms/assortativity/correlation.py | 13 ++++++------- + networkx/algorithms/assortativity/mixing.py | 1 - + .../algorithms/assortativity/neighbor_degree.py | 1 - + networkx/algorithms/assortativity/pairs.py | 1 - + networkx/algorithms/cluster.py | 1 - + networkx/algorithms/community/modularity_max.py | 1 - + networkx/algorithms/components/biconnected.py | 1 - + networkx/algorithms/isolate.py | 1 - + networkx/algorithms/isomorphism/isomorphvf2.py | 1 - + networkx/algorithms/traversal/beamsearch.py | 1 - + networkx/classes/graph.py | 2 +- + networkx/classes/reportviews.py | 1 - + networkx/conftest.py | 8 ++++++-- + networkx/linalg/attrmatrix.py | 1 - + networkx/readwrite/gexf.py | 11 ++--------- + networkx/readwrite/gpickle.py | 1 - + networkx/readwrite/graphml.py | 11 ++--------- + networkx/readwrite/nx_yaml.py | 1 - + networkx/readwrite/tests/test_graphml.py | 4 ++-- + tools/travis/script.sh | 2 +- + 22 files changed, 20 insertions(+), 49 deletions(-) + +diff --git a/networkx/readwrite/tests/test_graphml.py b/networkx/readwrite/tests/test_graphml.py +index 00b97d77..1946c487 100644 +--- a/networkx/readwrite/tests/test_graphml.py ++++ b/networkx/readwrite/tests/test_graphml.py +@@ -879,7 +879,7 @@ class TestWriteGraphML(BaseGraphML): + + xml = parse(fh) + # Children are the key elements, and the graph element +- children = xml.getroot().getchildren() ++ children = list(xml.getroot()) + assert len(children) == 3 + + keys = [child.items() for child in children[:2]] +-- +2.27.0 + diff --git a/dev-python/networkx/metadata.xml b/dev-python/networkx/metadata.xml new file mode 100644 index 000000000000..0d5472957160 --- /dev/null +++ b/dev-python/networkx/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</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="extras">Provide graph drawing and graph layout algorithms along with shapefile format reading and writing</flag> + <flag name="pandas">Provides a DataFrame, which is a tabular data structure with labeled axes</flag> + <flag name="scipy">Enables scipy backend</flag> + <flag name="yaml">Provides YAML format reading and writing</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-python/networkx/networkx-2.4-r1.ebuild b/dev-python/networkx/networkx-2.4-r1.ebuild new file mode 100644 index 000000000000..988703d38773 --- /dev/null +++ b/dev-python/networkx/networkx-2.4-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) +inherit distutils-r1 virtualx + +DESCRIPTION="Python tools to manipulate graphs and complex networks" +HOMEPAGE="https://networkx.github.io/ https://github.com/networkx/networkx" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="examples extras pandas scipy test xml yaml" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-python/decorator-4.3.0[${PYTHON_USEDEP}] + >=dev-python/matplotlib-2.2.2[${PYTHON_USEDEP}] + extras? ( + >=dev-python/pydot-1.2.4[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/pygraphviz-1.5[${PYTHON_USEDEP}] + >=sci-libs/gdal-1.10.0[python,${PYTHON_USEDEP}] + ' python3_{6,7,8}) + ) + pandas? ( + >=dev-python/pandas-0.23.3[${PYTHON_USEDEP}] + ) + scipy? ( >=sci-libs/scipy-1.1.0[${PYTHON_USEDEP}] ) + xml? ( >=dev-python/lxml-4.2.3[${PYTHON_USEDEP}] ) + yaml? ( >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}] )" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-py38.patch + "${FILESDIR}"/${P}-py39.patch +) + +src_prepare() { + # incompatible deps? + sed -e 's:test_multigraph_edgelist_tuples:_&:' \ + -i networkx/drawing/tests/test_pylab.py || die + + distutils-r1_src_prepare +} + +src_test() { + virtx distutils-r1_src_test +} + +python_install_all() { + use examples && dodoc -r examples + + distutils-r1_python_install_all +} diff --git a/dev-python/networkx/networkx-2.4.ebuild b/dev-python/networkx/networkx-2.4.ebuild new file mode 100644 index 000000000000..07a98d729cc8 --- /dev/null +++ b/dev-python/networkx/networkx-2.4.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# networkx-2.4 supports up to python3_8 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 virtualx + +DESCRIPTION="Python tools to manipulate graphs and complex networks" +HOMEPAGE="http://networkx.github.io/ https://github.com/networkx/networkx" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="examples extras pandas scipy test xml yaml" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + test? ( extras pandas scipy xml yaml )" + +COMMON_DEPEND=" + >=dev-python/matplotlib-2.2.2[${PYTHON_USEDEP}] + extras? ( + >=dev-python/pydot-1.2.4[${PYTHON_USEDEP}] + >=dev-python/pygraphviz-1.5[${PYTHON_USEDEP}] + >=sci-libs/gdal-1.10.0[python,${PYTHON_USEDEP}] + ) + pandas? ( >=dev-python/pandas-0.23.3[${PYTHON_USEDEP}] ) + scipy? ( >=sci-libs/scipy-1.1.0[${PYTHON_USEDEP}] ) + xml? ( >=dev-python/lxml-4.2.3[${PYTHON_USEDEP}] ) + yaml? ( >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}] )" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/decorator-4.3.0[${PYTHON_USEDEP}] + ${COMMON_DEPEND} + test? ( + dev-python/nose[${PYTHON_USEDEP}] + )" +RDEPEND=" + >=dev-python/decorator-4.3.0[${PYTHON_USEDEP}] + ${COMMON_DEPEND} + examples? ( + dev-python/pyparsing[${PYTHON_USEDEP}] + )" + +PATCHES=( +) + +python_test() { + virtx nosetests -vv +} + +python_install_all() { + use examples && dodoc -r examples + + distutils-r1_python_install_all +} |
