diff --git a/.gitignore b/.gitignore index 5132dbf..ee8eedb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pyphi-1.1.0.tar.gz /pyphi-1.2.0.tar.gz +/pyphi-1.2.1.tar.gz diff --git a/python-pyphi.spec b/python-pyphi.spec index a848bee..e187c4a 100644 --- a/python-pyphi.spec +++ b/python-pyphi.spec @@ -1,6 +1,3 @@ -# Note: package is python 3 only -%global srcname pyphi - %bcond_without tests %global _description %{expand: @@ -14,49 +11,36 @@ PyPhi: A toolbox for integrated information. arXiv:1712.09644 [q-bio.NC]. The manuscript is available at https://arxiv.org/abs/1712.09644.} -%{?python_enable_dependency_generator} +%global forgeurl https://github.com/wmayner/pyphi/ -Name: python-%{srcname} -Version: 1.2.0 -Release: 13%{?dist} +Name: python-pyphi +Version: 1.2.1 +Release: %autorelease Summary: A library for computing integrated information -License: GPLv3 -URL: https://github.com/wmayner/%{srcname}/ -Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz -BuildArch: noarch +%global tag %{version} +%forgemeta +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 %description %_description -%package -n python3-%{srcname} +%package -n python3-pyphi Summary: %{summary} BuildRequires: make 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} -%description -n python3-%{srcname} %_description +%description -n python3-pyphi %_description %package doc Summary: %{summary} @@ -66,7 +50,7 @@ Documentation for %{name} %prep -%autosetup -n %{srcname}-%{version} -S git +%autosetup -n pyphi-%{version} -S git # sphinx 1.3+, it's an extension # Also sent upstream: https://github.com/wmayner/pyphi/pull/22 @@ -74,35 +58,38 @@ sed -i "s/sphinxcontrib.napoleon/sphinx.ext.napoleon/" docs/conf.py find pyphi -name "*.py" -exec sed -i '/#!\/usr\/bin\/env python3/ d' '{}' \; +%generate_buildrequires +%pyproject_buildrequires -r + %build -%py3_build +%pyproject_wheel make -C docs SPHINXBUILD=sphinx-build-3 html rm docs/_build/html/{.doctrees,.buildinfo} -vf %install -%py3_install +%pyproject_install +%pyproject_save_files pyphi %check %if %{with tests} # Tests fails on s390x: https://github.com/wmayner/pyphi/issues/41 # cannot use ifarch or %_arch or %_host_cpu: they're all related to build arch, which is noarch here -%if "%_target_cpu" == "s390x" +%if "%_target_cpu" != "s390x" %{pytest} %endif %endif -%files -n python3-%{srcname} -%license LICENSE.md +%files -n python3-pyphi -f %{pyproject_files} %doc README.md CHANGELOG.md CACHING.rst redis.conf -%{python3_sitelib}/%{srcname} -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info %files doc %license LICENSE.md %doc docs/_build/html/ %changelog +%autochangelog + * Wed Aug 18 2021 Ankur Sinha - 1.2.0-13 - Correctly disable tests on s390x diff --git a/sources b/sources index a0f4892..bf552d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyphi-1.2.0.tar.gz) = 520237261b500cd78e47d98e60d0e2b741ed314ddb3a7f9e60dc8c1ea758d673972bdb64f40f7e99784e0e3bedf93fdeb8dcf7c636dda788c80f0bc6940fa8c1 +SHA512 (pyphi-1.2.1.tar.gz) = a33743db6114b98c01c65dfc57768f1f4c039791ef6570e3959b4b3483926d23e98bdf89781bf56ef17041dc4402ae07ea40cd368d6882290c45929ab34810ce