Blob Blame History Raw
# Note: package is python 3 only
%global srcname pyphi

%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}


Name:           python-%{srcname}
Version:        1.2.0
Release:        2%{?dist}
Summary:        A library for computing integrated information

License:        GPLv3
URL:            %{pypi_url}
BuildArch:      noarch

%description %_description

%package -n python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel
# To build docs, and run tests
BuildRequires:  %{py3_dist asv}
BuildRequires:  %{py3_dist decorator}
BuildRequires:  %{py3_dist joblib}
BuildRequires:  %{py3_dist numpy}
BuildRequires:  %{py3_dist psutil}
BuildRequires:  %{py3_dist pyemd}
BuildRequires:  %{py3_dist pymongo}
BuildRequires:  %{py3_dist pytest}
BuildRequires:  %{py3_dist pytest-lazy-fixture}
BuildRequires:  %{py3_dist pyyaml}
BuildRequires:  %{py3_dist redis}
BuildRequires:  %{py3_dist scipy}
BuildRequires:  %{py3_dist sphinx}
BuildRequires:  %{py3_dist sphinx_rtd_theme}
BuildRequires:  %{py3_dist setuptools}
BuildRequires:  %{py3_dist tblib}
BuildRequires:  %{py3_dist tqdm}
BuildRequires:  %{py3_dist wheel}

%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname} %_description

%package doc
Summary:        %{summary}

%description doc
Documentation for %{name}

%autosetup -n %{srcname}-%{version}

# sphinx 1.3+, it's an extension
# Also sent upstream:
sed -i "s/sphinxcontrib.napoleon/sphinx.ext.napoleon/" docs/

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


make -C docs SPHINXBUILD=sphinx-build-3 html
rm docs/_build/html/{.doctrees,.buildinfo} -vf


%if %{with tests}

%files -n python3-%{srcname}
%doc CACHING.rst redis.conf

%files doc
%doc docs/_build/html/

* 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 <> - 1.1.0-3
- Rebuilt for

* 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