## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname libpysal Name: python-%{srcname} Version: 4.7.0 %global tag v%{version} Release: %autorelease Summary: Python Spatial Analysis Library core components License: BSD URL: https://pysal.org # PyPI source doesn't include test data or docs. Source0: https://github.com/pysal/libpysal/archive/%{tag}/%{srcname}-%{version}.tar.gz # Test example datasets. Source1: https://geodacenter.github.io/data-and-lab//data/ncovr.zip Source2: https://github.com/sjsrey/newHaven/archive/master/newHaven.zip Source3: https://github.com/sjsrey/rio_grande_do_sul/archive/master/rio_grande_do_sul.zip Source4: https://github.com/sjsrey/taz/archive/master/taz.zip # Hard-code the list of datasets to not use the network. Patch: 0001-Hard-code-list-of-example-datasets.patch # We just use pytest directly. Patch: 0002-Drop-use-of-pytest-runner.patch # https://github.com/pysal/libpysal/pull/491 Patch: 0003-Fix-Linux-user-path-test.patch # https://github.com/pysal/libpysal/pull/492 Patch: 0004-Fix-warnings-from-Sphinx.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(beautifulsoup4) BuildRequires: python3dist(jinja2) BuildRequires: python3dist(numpy) >= 1.3 BuildRequires: python3dist(pandas) BuildRequires: python3dist(requests) BuildRequires: python3dist(scipy) >= 0.11 BuildRequires: python3dist(setuptools) BuildRequires: python3dist(geomet) BuildRequires: python3dist(geopandas) >= 0.2 BuildRequires: python3dist(matplotlib) >= 1.5.1 BuildRequires: python3dist(networkx) BuildRequires: python3dist(pytest) #BuildRequires: python3dist(numba) BuildRequires: python3dist(rtree) >= 0.8 BuildRequires: python3dist(sqlalchemy) BuildRequires: python3dist(xarray) %description Core components of PySAL - A library of spatial analysis functions. Modules include computational geometry, input and output, spatial weights, and built-in example datasets. %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} Core components of PySAL - A library of spatial analysis functions. Modules include computational geometry, input and output, spatial weights, and built-in example datasets. %package -n python-%{srcname}-doc Summary: Documentation for python-libpysal BuildRequires: pandoc %description -n python-%{srcname}-doc Documentation files for python-libpysal %prep %autosetup -n %{srcname}-%{version} -p1 # The real pandoc is installed, no need for the Python package. sed -i '/pandoc/d' requirements_docs.txt mkdir -p pysal_data/pysal unzip %SOURCE1 -d pysal_data/pysal/NCOVR unzip %SOURCE2 -d pysal_data/pysal/newHaven unzip %SOURCE3 -d pysal_data/pysal/Rio_Grande_do_Sul unzip %SOURCE4 -d pysal_data/pysal/taz %generate_buildrequires %pyproject_buildrequires -x docs %build %pyproject_wheel # generate html docs PYTHONPATH="%{pyproject_site_lib}" sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{srcname} %check export XDG_DATA_HOME=$PWD/pysal_data %{pytest} %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %files -n python-%{srcname}-doc %doc html libpysal/examples %license LICENSE.txt %changelog * Fri Jan 20 2023 Fedora Release Engineering 4.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Nov 21 2022 Elliott Sales de Andrade 4.7.0-1 - Update to latest version (#2143803) * Sun Jul 31 2022 Elliott Sales de Andrade 4.6.2-1 - Update to latest version (#2043981) * Sun Jul 31 2022 Elliott Sales de Andrade 4.5.1-11 - Switch to latest Python macros * Fri Jul 22 2022 Fedora Release Engineering - 4.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jan 21 2022 Fedora Release Engineering - 4.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 4.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon Jun 28 2021 Elliott Sales de Andrade - 4.5.1-1 - Update to latest version (#1976638) * Fri Jun 18 2021 Elliott Sales de Andrade - 4.4.0-2 - Fix WK1 on big-endian systems * Fri Jun 04 2021 Python Maint - 4.4.0-2 - Rebuilt for Python 3.10 * Sat Feb 06 2021 Elliott Sales de Andrade - 4.4.0-1 - Update to latest version (#1909569) * Wed Jan 27 2021 Fedora Release Engineering - 4.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 4.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jun 29 2020 Elliott Sales de Andrade - 4.3.0-1 - Update to latest version * Tue May 26 2020 Miro Hrončok - 4.2.2-2 - Rebuilt for Python 3.9 * Sun Feb 09 2020 Elliott Sales de Andrade - 4.2.2-1 - Update to latest version * Thu Jan 30 2020 Fedora Release Engineering - 4.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Sep 21 2019 Elliott Sales de Andrade - 4.1.1-1 - Update to latest version * Mon Aug 19 2019 Miro Hrončok - 4.1.0-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 4.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jul 22 2019 Elliott Sales de Andrade - 4.1.0-1 - Update to latest version * Sat Mar 23 2019 Elliott Sales de Andrade - 4.0.1-2 - Cleanup rpmlint warnings * Fri Mar 15 2019 Elliott Sales de Andrade - 4.0.1-1 - Initial package.