Blob Blame History Raw
# Created by pyp2rpm-3.3.2
%global pypi_name pysam

Name:           python-%{pypi_name}
Version:        0.18.0
Release:        2%{?dist}
Summary:        pysam

License:        MIT
URL:            https://github.com/pysam-developers/pysam
Source0:        %{pypi_source}

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(sphinx)
BuildRequires:  python3dist(cython)
BuildRequires:  gcc
BuildRequires:  zlib-devel
BuildRequires:  bzip2-devel
BuildRequires:  xz-devel

%description
pysam - a python module for reading, manipulating and writing genomic data
sets.pysam is a lightweight wrapper of the htslib C-API and provides facilities
to read and write SAM/BAM/VCF/BCF/BED/GFF/GTF/FASTA/FASTQ files as well as
access to the command line functionality of the samtools and bcftools packages.
The module supports compression and random access through indexing.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Provides:  bundled(samtools) = 1.14
Provides:  bundled(htslib) = 1.14
Provides:  bundled(bcftools) = 1.14

%description -n python3-%{pypi_name}
pysam - a python module for reading, manipulating and writing genomic data
sets.pysam is a lightweight wrapper of the htslib C-API and provides facilities
to read and write SAM/BAM/VCF/BCF/BED/GFF/GTF/FASTA/FASTQ files as well as
access to the command line functionality of the samtools and bcftools packages.
The module supports compression and random access through indexing.

%package -n     python3-%{pypi_name}-devel
Summary:        %{summary}

Requires: python3-%{pypi_name}%{?_isa} = %{version}-%{release}
%description -n python3-%{pypi_name}-devel
Development files for pysam

%package -n python-%{pypi_name}-doc
Summary:        pysam documentation
BuildArch: noarch
%description -n python-%{pypi_name}-doc
Documentation for pysam

%prep
%autosetup -n %{pypi_name}-%{version} -p 1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

# Remove pre-generated files
rm $(grep -rl '/\* Generated by Cython')

%build
FORCE_CYTHON=1 %py3_build
# generate html docs 
PYTHONPATH=${PWD} sphinx-build-3 doc html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%py3_install

%files -n python3-%{pypi_name}
%doc README.rst
%license COPYING
%dir %{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}/*so
%{python3_sitearch}/%{pypi_name}/*py
%{python3_sitearch}/%{pypi_name}/__pycache__
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

%files -n python3-%{pypi_name}-devel
%{python3_sitearch}/%{pypi_name}/*h
%{python3_sitearch}/%{pypi_name}/*pxd
%{python3_sitearch}/%{pypi_name}/include

%files -n python-%{pypi_name}-doc
%doc html

%changelog
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sun Nov 21 2021 David Bold <davidsch@fedoraproject.org> - 0.18.0-1
- Update to 0.18.0

* Wed Oct 06 2021 David Bold <davidsch@fedoraproject.org> - 0.17.0-1
- Update to 0.17.0

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild


* Sat Jun 05 2021 David <davidsch@fedoraproject.org> - 0.16.0.1-5
- Add patch to fix building with sphinx 4.0.2

* Sat Jun 05 2021 David <davidsch@fedoraproject.org> - 0.16.0.1-4
- Add patch to fix building with sphinx 4

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.16.0.1-3
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Sun Nov 01 2020 David <davidsch@fedoraproject.org > - 0.16.0.1-1
- Initial package.