Blob Blame History Raw
%bcond_without check

%global srcname emcee

Name: python-%{srcname}
Version: 3.1.6
Release: %autorelease
Summary: The Python ensemble sampling toolkit for affine-invariant MCMC
License: MIT

Source0: %{pypi_source}
BuildRequires: python3-devel 
BuildArch: noarch

%global _description %{expand: 
emcee is a stable, well tested Python implementation of the affine-invariant ensemble sampler for Markov chain Monte Carlo (MCMC) proposed by Goodman & Weare (2010). The code is open source and has already been used in several published projects in the Astrophysics literature.}

%description %_description

%package -n python3-%{srcname}
Summary: %{summary}
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist setuptools_scm}
%if %{with check}
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist scipy}
BuildRequires: %{py3_dist h5py}

%description -n python3-%{srcname}

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




%pyproject_save_files emcee

%if %{with check}
# Some tests are failling in ppc64le with longdouble
export PYTEST_ADDOPTS='-p no:cacheprovider'
pushd %{buildroot}/%{python3_sitelib}
   pytest-%{python3_version} \
%ifarch ppc64le
   --deselect "emcee/tests/integration/[TempHDFBackend]" \
   --deselect "emcee/tests/unit/[TempHDFBackend]" \
   --deselect "emcee/tests/unit/" \

%files -n python3-%{srcname} -f %{pyproject_files}
%doc AUTHORS.rst HISTORY.rst README.rst