Blob Blame History Raw
%global srcname fitsio
%global sum A full featured python library to read from and write to FITS files

Name:           python-%{srcname}
Version:        1.1.8
Release:        %autorelease
Summary:        %{sum}

License:        GPLv2+
URL:  {srcname}
Source0:        %{pypi_source}

# Patch to force usage of Fedora cfitsio instead of bundled copy
Patch0:         %{name}-use-system-cfitsio.patch

# General
BuildRequires:  cfitsio-devel
BuildRequires:  gcc
# Python 3
BuildRequires:  python3-devel


%package -n python3-%{srcname}
Summary:        %{sum}

%description -n python3-%{srcname}

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

sed -i "s,@INCLUDEDIR@,%{_includedir}/cfitsio,g"
sed -i "s,@LIBDIR@,%{_libdir},g"

# Remove egg files from source
rm -r %{srcname}.egg-info



%pyproject_save_files fitsio


%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.txt