#2 SPDX, PDF docs, miscellaneous tidying
Merged 6 months ago by music. Opened 6 months ago by music.
rpms/ music/python-pyphi misc  into  rawhide

file added
+36
@@ -0,0 +1,36 @@ 

+ From 4885c797ba095057487dc586ca62c970ed473cf5 Mon Sep 17 00:00:00 2001

+ From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>

+ Date: Mon, 19 Nov 2018 20:09:52 +0000

+ Subject: [PATCH] Remove sphinx-contrib-napoleon

+ 

+ From sphinx 1.3 onwards, this comes with sphinx itself.

+ https://pypi.org/project/sphinxcontrib-napoleon/

+ ---

+  dev_requirements.txt | 3 +--

+  docs/conf.py         | 2 +-

+  2 files changed, 2 insertions(+), 3 deletions(-)

+ 

+ diff --git a/dev_requirements.txt b/dev_requirements.txt

+ index 2f23d32f6..36a0537db 100644

+ --- a/dev_requirements.txt

+ +++ b/dev_requirements.txt

+ @@ -1,5 +1,4 @@

+ -Sphinx

+ -sphinxcontrib-napoleon

+ +Sphinx >= 1.3

+  setuptools >=38.6.0

+  twine >=1.11.0

+  wheel >=0.31.0

+ diff --git a/docs/conf.py b/docs/conf.py

+ index 88d4dbfc1..a566c36a7 100644

+ --- a/docs/conf.py

+ +++ b/docs/conf.py

+ @@ -41,7 +41,7 @@

+      'sphinx.ext.todo',

+      'sphinx.ext.coverage',

+      'sphinx.ext.mathjax',

+ -    'sphinxcontrib.napoleon'

+ +    'sphinx.ext.napoleon',

+  ]

+  

+  mathjax_path = ('https://cdnjs.cloudflare.com'

file added
+75
@@ -0,0 +1,75 @@ 

+ * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-6

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

+ 

+ * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

+ 

+ * Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 1.2.1-4

+ - Rebuilt for Python 3.11

+ 

+ * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

+ 

+ * Sun Oct 03 2021 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.1-2

+ - fix: ignore s390x where test fail because of endianness

+ 

+ * Sun Oct 03 2021 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.1-1

+ - feat: update to 1.2.1

+ 

+ * Wed Aug 18 2021 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-17

+ - fix: correctly disable tests on s390x

+ 

+ * Wed Aug 18 2021 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-16

+ - fix: add patch to fix build

+ 

+ * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-15

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

+ 

+ * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.2.0-14

+ - Rebuilt for Python 3.10

+ 

+ * Fri Jan 29 2021 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-13

+ - Update URL

+ 

+ * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-12

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

+ 

+ * Fri Jan 08 2021 Tom Stellard <tstellar@redhat.com> - 1.2.0-11

+ - Add BuildRequires: make

+ 

+ * Tue Oct 27 2020 Tomas Hrnciar <thrnciar@redhat.com> - 1.2.0-10

+ - Replace Python version glob with macro (needed for Python 3.10+)

+ 

+ * Sun Sep 13 2020 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-9

+ - Skip tests on s390x

+ 

+ * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8

+ - Second attempt - Rebuilt for

+   https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

+ 

+ * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-7

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

+ 

+ * Tue May 26 2020 Miro Hrončok <miro@hroncok.cz> - 1.2.0-6

+ - Rebuilt for Python 3.9

+ 

+ * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

+ 

+ * Mon Aug 19 2019 Miro Hrončok <miro@hroncok.cz> - 1.2.0-4

+ - Rebuilt for Python 3.8

+ 

+ * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

+ 

+ * Fri Jul 12 2019 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-2

+ - Enable tests

+ 

+ * Sat Jun 22 2019 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.2.0-1

+ - Update to 1.2.0

+ 

+ * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

+ 

+ * Tue Nov 20 2018 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.1.0-1

+ - Initial import 

\ No newline at end of file

file modified
+74 -92
@@ -1,74 +1,108 @@ 

  %bcond_without tests

  

- %global _description %{expand:

- PyPhi is a Python library for computing integrated information, and the

- associated quantities and objects.

- 

- If you use this code, please cite the manuscript:

- 

- Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G (2017).

- PyPhi: A toolbox for integrated information. arXiv:1712.09644 [q-bio.NC].

- 

- The manuscript is available at https://arxiv.org/abs/1712.09644.}

- 

- %global forgeurl  https://github.com/wmayner/pyphi/

+ # Sphinx-generated HTML documentation is not suitable for packaging; see

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.

+ #

+ # We can generate PDF documentation as a substitute.

+ %bcond_without doc_pdf

  

  Name:           python-pyphi

  Version:        1.2.1

  Release:        %autorelease

- Summary:        A library for computing integrated information

+ Summary:        A toolbox for integrated information theory

  

- %global tag  %{version}

- %forgemeta

+ # The entire source is GPL-3.0-or-later, except:

+ #

+ #   - docs/_themes/ contains “krTheme Sphinx Style,” which is BSD-3-Clause; but

+ #     we remove it in %%prep and do not use it.

+ License:        GPL-3.0-or-later

+ URL:            https://github.com/wmayner/pyphi/

+ Source0:        %{url}/%{version}/pyphi-%{version}.tar.gz

  

- License:        GPLv3

- URL:            %forgeurl

- Source0:        %forgesource

  # https://github.com/wmayner/pyphi/pull/50

- Patch0:         0001-fix-py3.10-correct-collections-import.patch

- BuildRequires:  git-core

- BuildArch:      noarch

+ Patch:          0001-fix-py3.10-correct-collections-import.patch

+ # Remove sphinx-contrib-napoleon

+ # https://github.com/wmayner/pyphi/pull/22

+ Patch:          %{url}/pull/22.patch

  

  # Tests fails on s390x: https://github.com/wmayner/pyphi/issues/41

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2010104

  ExcludeArch:    s390x

  

- %description %_description

+ # The base package is arched so we can easily detect arch-dependent build

+ # issues, but there is no compiled code.

+ %global debug_package %{nil}

  

- %package -n python3-pyphi

- Summary:        %{summary}

- BuildRequires:  make

  BuildRequires:  python3-devel

- BuildRequires:  %{py3_dist pytest}

- BuildRequires:  %{py3_dist pytest-lazy-fixture}

+ 

+ %if %{with doc_pdf}

+ # Documentation

+ BuildRequires:  make

  BuildRequires:  %{py3_dist sphinx}

+ BuildRequires:  python3-sphinx-latex

+ BuildRequires:  latexmk

+ BuildRequires:  tex-xetex-bin

+ BuildRequires:  /usr/bin/xindy

+ # HTML theme module is imported even when building LaTeX:

  BuildRequires:  %{py3_dist sphinx_rtd_theme}

+ %endif

+ 

+ %global _description %{expand:

+ PyPhi is a Python library for computing integrated information (𝚽), and the

+ associated quantities and objects.

+ 

+ If you use this code, please cite the paper:

+ 

+   Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G. (2018)

+   PyPhi: A toolbox for integrated information theory. PLOS Computational

+   Biology 14(7): e1006343. https://doi.org/10.1371/journal.pcbi.1006343}

+ 

+ %description %_description

+ 

+ %package -n python3-pyphi

+ Summary:        %{summary}

+ 

+ BuildArch:      noarch

  

  %description -n python3-pyphi %_description

  

  %package doc

  Summary:        %{summary}

  

+ BuildArch:      noarch

+ 

  %description doc

  Documentation for %{name}

  

- 

  %prep

- %autosetup -n pyphi-%{version} -S git

+ %autosetup -n pyphi-%{version} -p1

+ 

+ # Strip unnecessary shebangs from non-script files

+ find . -type f -name '*.py' -execdir sed -r -i '1{/^#!/d}' '{}' '+'

  

- # sphinx 1.3+, it's an extension

- # Also sent upstream: https://github.com/wmayner/pyphi/pull/22

- sed -i "s/sphinxcontrib.napoleon/sphinx.ext.napoleon/" docs/conf.py

+ # Remove a bundled copy of gprof2dot (packaged in Fedora, upstream at

+ # https://github.com/jrfonseca/gprof2dot); we do not need to do profiling and

+ # will not ship it in the binary RPMs.

+ rm -v profiling/gprof2dot

+ # Remove a bundled copy of “krTheme Sphinx Style”

+ rm -rvf docs/_themes/*

  

- find pyphi -name "*.py" -exec sed -i '/#!\/usr\/bin\/env python3/ d' '{}' \;

+ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters

+ sed -r '/^(coverage|asv|virtualenv)\b/d' test_requirements.txt |

+   tee test_requirements.filtered.txt

+ 

+ # Since pdflatex cannot handle Unicode inputs in general:

+ echo "latex_engine = 'xelatex'" >> docs/conf.py

  

  %generate_buildrequires

- %pyproject_buildrequires -r

+ %pyproject_buildrequires %{?with_tests:test_requirements.filtered.txt}

  

  %build

  %pyproject_wheel

- 

- make -C docs SPHINXBUILD=sphinx-build-3 html

- rm docs/_build/html/{.doctrees,.buildinfo} -vf

+ %if %{with doc_pdf}

+ %make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}'

+ %make_build -C docs/_build/latex LATEXMKOPTS='-quiet'

+ %endif

  

  %install

  %pyproject_install
@@ -84,61 +118,9 @@ 

  

  %files doc

  %license LICENSE.md

- %doc docs/_build/html/

+ %if %{with doc_pdf}

+ %doc docs/_build/latex/PyPhi.pdf

+ %endif

  

  %changelog

  %autochangelog

- 

- * Wed Aug 18 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.0-13

- - Correctly disable tests on s390x

- 

- * Wed Aug 18 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.0-12

- - Fix build

- 

- * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-11

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

- 

- * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.2.0-10

- - Rebuilt for Python 3.10

- 

- * Fri Jan 29 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.0-9

- - Update URL

- 

- * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-9

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

- 

- * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8

- - Second attempt - Rebuilt for

-   https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

- 

- * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-7

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

- 

- * Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-6

- - Rebuilt for Python 3.9

- 

- * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

- 

- * Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-4

- - Rebuilt for Python 3.8

- 

- * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

- 

- * Fri Jul 12 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.0-2

- - Enable tests

- 

- * Sat Jun 22 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.2.0-1

- - Update to 1.2.0

- 

- * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

- 

- * Mon Nov 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1.0-2

- - Update license

- - Fix doc generation

- - Correct rpmlint errors

- 

- * Wed Nov 14 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1.0-1

- - Initial rpm build

See commit messages for details.

Pull-Request has been merged by music

6 months ago