diff --git a/.gitignore b/.gitignore index ee7d652..360c5ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pyunicorn-0.6.1.tar.gz +/pyunicorn-master.tar.gz diff --git a/0001-Skip-test.patch b/0001-Skip-test.patch deleted file mode 100644 index 0fbd430..0000000 --- a/0001-Skip-test.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/tox.ini b/tox.ini ---- a/tox.ini 2019-06-20 16:28:38.000000000 +0200 -+++ b/tox.ini 2021-03-29 21:22:00.844698941 +0200 -@@ -30,7 +30,7 @@ - networkx - commands = - {[testenv]commands} -- py.test --cov=pyunicorn tests -+ py.test --cov=pyunicorn -ra -k 'not test_init_str and not testTwinSurrogates and not test_average_link_distance' tests - - [testenv:style] - skipdist = True diff --git a/0002-Remove-badges-in-README.patch b/0002-Remove-badges-in-README.patch deleted file mode 100644 index 7f04c9f..0000000 --- a/0002-Remove-badges-in-README.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN a/README.rst b/README.rst ---- a/README.rst 2019-06-21 10:12:36.000000000 +0200 -+++ b/README.rst 2022-02-19 23:32:41.043399532 +0100 -@@ -2,12 +2,6 @@ - pyunicorn - ========= - --.. image:: https://travis-ci.org/pik-copan/pyunicorn.svg?branch=master -- :target: https://travis-ci.org/pik-copan/pyunicorn --.. image:: https://codecov.io/gh/pik-copan/pyunicorn/branch/master/graph/badge.svg -- :target: https://codecov.io/gh/pik-copan/pyunicorn -- -- - ``pyunicorn`` (**Uni**\ fied **Co**\ mplex Network and **R**\ ecurre\ **N**\ ce - analysis toolbox) is a fully object-oriented Python package for the advanced - analysis and modeling of complex networks. Above the standard measures of diff --git a/python-pyunicorn.spec b/python-pyunicorn.spec index 115b62c..45072c9 100644 --- a/python-pyunicorn.spec +++ b/python-pyunicorn.spec @@ -9,6 +9,8 @@ %bcond_without doc_pdf %global pypi_name pyunicorn +%global forgeurl https://github.com/pik-copan/pyunicorn +%global commit master %global _description %{expand: pyunicorn (Unified Complex Network and RecurreNce analysis toolbox) @@ -21,8 +23,12 @@ Newman's random walk betweenness. pyunicorn features novel node-weighted designed for analyzing networks of interacting/interdependent networks.} Name: python-%{pypi_name} -Version: 0.6.1 -Release: %autorelease + +%forgemeta + +# Set version to preliminary version defined in setup.cfg +Version: 0.7.0a1 +Release: %{autorelease} Summary: Unified complex network and recurrence analysis toolbox # The entire source code is BSD except the following files: @@ -32,49 +38,40 @@ Summary: Unified complex network and recurrence analysis toolbox #pyunicorn-0.6.1/pyunicorn/utils/progressbar/widgets.py License: BSD and LGPLv2+ URL: http://www.pik-potsdam.de/~donges/pyunicorn/ -Source0: %{pypi_source pyunicorn} +Source0: %{forgesource} # patch intended for skipping two tests due to the failed attempts on i686 -Patch0: 0001-Skip-test.patch +#Patch0: 0001-Skip-test.patch # patch removes two badges that are in svg format # it resolves problems with building docs -Patch1: 0002-Remove-badges-in-README.patch +#Patch1: 0002-Remove-badges-in-README.patch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) -# Fox %%tox macro -BuildRequires: python3-tox-current-env %if %{with doc_pdf} BuildRequires: make +BuildRequires: python3-sphinx BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif BuildRequires: make BuildRequires: gcc-c++ -BuildRequires: Cython +BuildRequires: Cython < 3~~ BuildRequires: python3-igraph BuildRequires: numpy BuildRequires: python3-networkx BuildRequires: python3-basemap -BuildRequires: python3-sphinx BuildRequires: python3-scipy -# For the patch -BuildRequires: git-core - Requires: matplotlib %if %{with tests} BuildRequires: python3-pytest -BuildRequires: python3-pytest-cov -BuildRequires: python3-pytest-flake8 -BuildRequires: python3-pytest-xdist -BuildRequires: python3-pylint -BuildRequires: python3-tox +BuildRequires: python3-cartopy %endif %description %_description @@ -91,31 +88,33 @@ Summary: Documentation and examples for %{name} %{summary}. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -p1 -n %{pypi_name}-%{commit} for lib in $(find . -name "*.py"); do sed '1{\@^#!/usr/bin/python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done -# Fix igraph dependency -%if 0%{?fedora} >= 36 -sed -i -e 's/python-igraph/igraph/' requirements.txt tox.ini -%endif +# Disable coverage and fix pytest command (has no option '-n') +sed -i -e 's/-n auto //' setup.cfg %build %py3_build -%if %{with doc_pdf} -%make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' -%make_build -C docs/build/latex LATEXMKOPTS='-quiet' -%endif %install %py3_install +# We run this in %%install, since Sphinx imports __version__ from pyunicorn. +# So, that needs to be installed first. +%if %{with doc_pdf} +%{py3_test_envvars} %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' +%{py3_test_envvars} %make_build -C docs/build/latex LATEXMKOPTS='-quiet' +%endif + + %check %if %{with tests} -%tox -e units +%pytest %endif %files -n python3-%{pypi_name} diff --git a/sources b/sources index d62feeb..a4c108d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyunicorn-0.6.1.tar.gz) = f3d1b735c116a8bc0b75e061cb662729201fb9a64001595b7f1a8d9c7d177dcd41bc6217caae79369a0f60e57772d252a4373344fbffc2b245a31247fac3cfde +SHA512 (pyunicorn-master.tar.gz) = b5813a3505894384fb3bee840954bd30fc67e7b359fd4efc512bc1ffe8c89bcd1107a9c199f44ec478fc1d8a402e4d0dc4e56ca45014f6b059b0b6e3a90b1083