Blame python-pyphi.spec

9f8af7d
# Note: package is python 3 only
9f8af7d
%global srcname pyphi
9f8af7d
9f8af7d
%bcond_with tests
9f8af7d
9f8af7d
%global desc %{expand: \
9f8af7d
PyPhi is a Python library for computing integrated information, and the
9f8af7d
associated quantities and objects.
9f8af7d
9f8af7d
If you use this code, please cite the manuscript:
9f8af7d
9f8af7d
Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G (2017).
9f8af7d
PyPhi: A toolbox for integrated information. arXiv:1712.09644 [q-bio.NC].
9f8af7d
9f8af7d
The manuscript is available at https://arxiv.org/abs/1712.09644.}
9f8af7d
9f8af7d
%{?python_enable_dependency_generator}
9f8af7d
9f8af7d
Name:           python-%{srcname}
9f8af7d
Version:        1.1.0
9f8af7d
Release:        2%{?dist}
9f8af7d
Summary:        A library for computing integrated information
9f8af7d
9f8af7d
License:        GPLv3
9f8af7d
URL:            https://pypi.python.org/pypi/%{srcname}
9f8af7d
Source0:        https://github.com/wmayner/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
9f8af7d
BuildArch:      noarch
9f8af7d
9f8af7d
%description
9f8af7d
%{desc}
9f8af7d
9f8af7d
%package -n python3-%{srcname}
9f8af7d
Summary:        %{summary}
9f8af7d
BuildRequires:  python3-devel
9f8af7d
# To build docs, and run tests
9f8af7d
BuildRequires:  %{py3_dist sphinx}
9f8af7d
BuildRequires:  %{py3_dist setuptools}
9f8af7d
BuildRequires:  %{py3_dist wheel}
9f8af7d
BuildRequires:  %{py3_dist pyyaml}
9f8af7d
BuildRequires:  %{py3_dist tqdm}
9f8af7d
BuildRequires:  %{py3_dist numpy}
9f8af7d
BuildRequires:  %{py3_dist pytest}
9f8af7d
BuildRequires:  %{py3_dist pyyaml}
9f8af7d
BuildRequires:  %{py3_dist redis}
9f8af7d
BuildRequires:  %{py3_dist tblib}
9f8af7d
BuildRequires:  %{py3_dist tqdm}
9f8af7d
BuildRequires:  %{py3_dist psutil}
9f8af7d
BuildRequires:  %{py3_dist asv}
9f8af7d
BuildRequires:  %{py3_dist pyemd}
9f8af7d
BuildRequires:  %{py3_dist scipy}
9f8af7d
BuildRequires:  %{py3_dist joblib}
9f8af7d
BuildRequires:  %{py3_dist pymongo}
9f8af7d
BuildRequires:  %{py3_dist decorator}
9f8af7d
9f8af7d
%{?python_provide:%python_provide python3-%{srcname}}
9f8af7d
9f8af7d
%description -n python3-%{srcname}
9f8af7d
%{desc}
9f8af7d
9f8af7d
%package doc
9f8af7d
Summary:        %{summary}
9f8af7d
9f8af7d
%description doc
9f8af7d
%{desc}
9f8af7d
9f8af7d
9f8af7d
%prep
9f8af7d
%autosetup -n %{srcname}-%{version}
9f8af7d
9f8af7d
# sphinx 1.3+, it's an extension
9f8af7d
# Also sent upstream: https://github.com/wmayner/pyphi/pull/22
9f8af7d
sed -i "s/sphinxcontrib.napoleon/sphinx.ext.napoleon/" docs/conf.py
9f8af7d
9f8af7d
find pyphi -name "*.py" -exec sed -i '/#!\/usr\/bin\/env python3/ d' '{}' \;
9f8af7d
9f8af7d
%build
9f8af7d
%py3_build
9f8af7d
9f8af7d
pushd docs
9f8af7d
    make SPHINXBUILD=sphinx-build-3 html
9f8af7d
    rm -rf _build/html/.doctrees
9f8af7d
    rm -rf _build/html/.buildinfo
9f8af7d
popd
9f8af7d
9f8af7d
%install
9f8af7d
%py3_install
9f8af7d
9f8af7d
%check
9f8af7d
%if %{with tests}
9f8af7d
py.test-%{python3_version}
9f8af7d
%endif
9f8af7d
9f8af7d
%files -n python3-%{srcname}
9f8af7d
%license LICENSE.md
9f8af7d
%doc README.md CHANGELOG.md CACHING.rst redis.conf
9f8af7d
%{python3_sitelib}/%{srcname}
9f8af7d
%{python3_sitelib}/%{srcname}-%{version}-py3.?.egg-info
9f8af7d
9f8af7d
%files doc
9f8af7d
%license LICENSE.md
9f8af7d
%doc docs/_build/html/
9f8af7d
9f8af7d
%changelog
9f8af7d
* Mon Nov 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1.0-2
9f8af7d
- Update license
9f8af7d
- Fix doc generation
9f8af7d
- Correct rpmlint errors
9f8af7d
9f8af7d
* Wed Nov 14 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1.0-1
9f8af7d
- Initial rpm build