Blame python-libpysal.spec

c8b5bb
%global srcname libpysal
c8b5bb
c8b5bb
Name:           python-%{srcname}
c8b5bb
Version:        4.0.1
c8b5bb
Release:        2%{?dist}
c8b5bb
Summary:        Python Spatial Analysis Library core components
c8b5bb
c8b5bb
License:        BSD
c8b5bb
URL:            https://pysal.org
c8b5bb
# PyPI source doesn't include test data or docs.
c8b5bb
Source0:        https://github.com/pysal/libpysal/archive/v%{version}/%{srcname}-%{version}.tar.gz
c8b5bb
BuildArch:      noarch
c8b5bb
c8b5bb
BuildRequires:  python3-devel
c8b5bb
BuildRequires:  python3dist(geomet)
c8b5bb
BuildRequires:  python3dist(geopandas) >= 0.2
c8b5bb
BuildRequires:  python3dist(matplotlib) >= 1.5.1
c8b5bb
BuildRequires:  python3dist(networkx)
c8b5bb
BuildRequires:  python3dist(nose)
c8b5bb
BuildRequires:  python3dist(nose-exclude)
c8b5bb
BuildRequires:  python3dist(nose-progressive)
c8b5bb
#BuildRequires:  python3dist(numba)
c8b5bb
BuildRequires:  python3dist(numpy) >= 1.3
c8b5bb
BuildRequires:  python3dist(numpydoc)
c8b5bb
BuildRequires:  python3dist(pandas)
c8b5bb
BuildRequires:  python3dist(rtree) >= 0.8
c8b5bb
BuildRequires:  python3dist(scipy) >= 0.11
c8b5bb
BuildRequires:  python3dist(setuptools)
c8b5bb
BuildRequires:  python3dist(sphinx) >= 1.4.3
c8b5bb
BuildRequires:  python3dist(sphinx-bootstrap-theme)
c8b5bb
BuildRequires:  python3dist(sphinxcontrib-bibtex)
c8b5bb
BuildRequires:  python3dist(sqlalchemy)
c8b5bb
c8b5bb
%description
c8b5bb
Core components of PySAL - A library of spatial analysis functions. Modules
c8b5bb
include computational geometry, input and output, spatial weights, and built-in
c8b5bb
example datasets.
c8b5bb
c8b5bb
c8b5bb
%package -n     python3-%{srcname}
c8b5bb
Summary:        %{summary}
c8b5bb
%{?python_provide:%python_provide python3-%{srcname}}
c8b5bb
c8b5bb
%description -n python3-%{srcname}
c8b5bb
Core components of PySAL - A library of spatial analysis functions. Modules
c8b5bb
include computational geometry, input and output, spatial weights, and built-in
c8b5bb
example datasets.
c8b5bb
c8b5bb
c8b5bb
%package -n     python-%{srcname}-doc
c8b5bb
Summary:        Documentation for python-libpysal
c8b5bb
c8b5bb
%description -n python-%{srcname}-doc
c8b5bb
Documentation files for python-libpysal
c8b5bb
c8b5bb
c8b5bb
%prep
c8b5bb
%autosetup -n %{srcname}-%{version}
c8b5bb
c8b5bb
# Remove bundled egg-info
c8b5bb
rm -rf %{srcname}.egg-info
c8b5bb
rm distribute_setup.py
c8b5bb
c8b5bb
# Remove executable bits.
c8b5bb
chmod -x libpysal/examples/*/*.*
c8b5bb
c8b5bb
# Fix line endings
c8b5bb
for file in \
c8b5bb
libpysal/examples/clearwater/clearwater_BS_F.ctl \
c8b5bb
libpysal/examples/clearwater/clearwater_BS_F_summary.txt \
c8b5bb
libpysal/examples/clearwater/clearwater_BS_NN.ctl \
c8b5bb
libpysal/examples/clearwater/clearwater_BS_NN_summary.txt \
c8b5bb
libpysal/examples/clearwater/clearwater_GS_F.ctl \
c8b5bb
libpysal/examples/clearwater/clearwater_GS_F_summary.txt \
c8b5bb
libpysal/examples/clearwater/clearwater_GS_NN.ctl \
c8b5bb
libpysal/examples/clearwater/clearwater_GS_NN_summary.txt \
c8b5bb
libpysal/examples/clearwater/landslides.csv \
c8b5bb
libpysal/examples/geodanet/crimes.shp.xml \
c8b5bb
libpysal/examples/geodanet/schools.shp.xml \
c8b5bb
libpysal/examples/georgia/GData_utm.csv \
c8b5bb
libpysal/examples/georgia/georgia_BS_F.ctl \
c8b5bb
libpysal/examples/georgia/georgia_BS_F_summary.txt \
c8b5bb
libpysal/examples/georgia/georgia_BS_NN.ctl \
c8b5bb
libpysal/examples/georgia/georgia_BS_NN_summary.txt \
c8b5bb
libpysal/examples/georgia/georgia_GS_F.ctl \
c8b5bb
libpysal/examples/georgia/georgia_GS_F_summary.txt \
c8b5bb
libpysal/examples/georgia/georgia_GS_NN.ctl \
c8b5bb
libpysal/examples/georgia/georgia_GS_NN_summary.txt \
c8b5bb
libpysal/examples/nyc_bikes/nyct2010.shp.xml \
c8b5bb
libpysal/examples/sids2/sids2.gal \
c8b5bb
libpysal/examples/stl/stl.gal \
c8b5bb
libpysal/examples/stl/stl_hom.txt \
c8b5bb
libpysal/examples/tokyo/Readme_tokyomortality.txt \
c8b5bb
libpysal/examples/tokyo/SampleTokyoMortalityGWPR.ctl \
c8b5bb
libpysal/examples/tokyo/Tokyomortality.csv \
c8b5bb
libpysal/examples/tokyo/Tokyomortality.txt \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_F.ctl \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_F_summary.txt \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_NN.ctl \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_NN_OFF.ctl \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_NN_OFF_summary.txt \
c8b5bb
libpysal/examples/tokyo/tokyo_BS_NN_summary.txt \
c8b5bb
libpysal/examples/tokyo/tokyo_GS_F.ctl \
c8b5bb
libpysal/examples/tokyo/tokyo_GS_F_summary.txt \
c8b5bb
libpysal/examples/tokyo/tokyo_GS_NN.ctl \
c8b5bb
libpysal/examples/tokyo/tokyo_GS_NN_summary.txt \
c8b5bb
libpysal/examples/tokyo/tokyomet262.shp.xml \
c8b5bb
libpysal/examples/us_income/spi_download.csv \
c8b5bb
libpysal/examples/wmat/wmat.dat \
c8b5bb
libpysal/examples/wmat/wmat.mtx \
c8b5bb
; do
c8b5bb
    sed "s|\r||g" ${file} > ${file}.new
c8b5bb
    touch -r ${file} ${file}.new
c8b5bb
    mv ${file}.new ${file}
c8b5bb
done
c8b5bb
c8b5bb
c8b5bb
%build
c8b5bb
%py3_build
c8b5bb
c8b5bb
# generate html docs
c8b5bb
PYTHONPATH=${PWD}/build/lib sphinx-build-3 doc html
c8b5bb
# remove the sphinx-build leftovers
c8b5bb
rm -rf html/.{doctrees,buildinfo}
c8b5bb
c8b5bb
c8b5bb
%install
c8b5bb
%py3_install
c8b5bb
c8b5bb
c8b5bb
%check
c8b5bb
%{__python3} setup.py test
c8b5bb
c8b5bb
c8b5bb
%files -n python3-%{srcname}
c8b5bb
%doc README.rst
c8b5bb
%license LICENSE.txt
c8b5bb
%{python3_sitelib}/%{srcname}
c8b5bb
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
c8b5bb
c8b5bb
%files -n python-%{srcname}-doc
c8b5bb
%doc html libpysal/examples
c8b5bb
%license LICENSE.txt
c8b5bb
c8b5bb
c8b5bb
%changelog
c8b5bb
* Sat Mar 23 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.0.1-2
c8b5bb
- Cleanup rpmlint warnings
c8b5bb
c8b5bb
* Fri Mar 15 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.0.1-1
c8b5bb
- Initial package.