Blame python-pygiftiio.spec

f172162
# https://fedoraproject.org/wiki/Packaging:DistTag?rd=Packaging/DistTag#Conditionals
f172162
# http://rpm.org/user_doc/conditional_builds.html
f172162
%if 0%{?fedora} >= 30
f172162
# disabled by default
f172162
%bcond_with py2
f172162
%else
f172162
%bcond_without py2 0
f172162
%endif
f172162
f172162
%global srcname pygiftiio
f172162
f172162
%global desc %{expand: \
f172162
GIFTI is an XML-based file format for cortical surface data. This reference IO
f172162
implementation is developed by the Neuroimaging Informatics Technology
f172162
Initiative (NIfTI).}
f172162
f172162
Name:           python-%{srcname}
f172162
Version:        1.0.4
531d449
Release:        9%{?dist}
f172162
Summary:        Python bindings for Gifti
f172162
f172162
License:        GPLv2
f172162
URL:            https://www.nitrc.org/frs/?group_id=75
f172162
Source0:        https://www.nitrc.org/frs/download.php/1285/%{srcname}-%{version}.tar.gz
f172162
Source1:        https://www.nitrc.org/frs/download.php/261/gifti_write_example.py
f172162
Source2:        https://www.nitrc.org/frs/download.php/260/gifti_read_example.py
f172162
f172162
BuildArch:      noarch
f172162
f172162
%description
f172162
%{desc}
f172162
f172162
%if %{with py2}
f172162
%package -n python2-%{srcname}
f172162
Summary:        %{summary}
f172162
BuildRequires:  python2-devel
f172162
Requires:       gifticlib-devel
f172162
%{?python_provide:%python_provide python2-%{srcname}}
f172162
f172162
%description -n python2-%{srcname}
f172162
%{desc}
f172162
%endif
f172162
f172162
%package -n python3-%{srcname}
f172162
Summary:        %{summary}
f172162
BuildRequires:  python3-devel
f172162
Requires:       gifticlib-devel
f172162
%{?python_provide:%python_provide python3-%{srcname}}
f172162
f172162
%description -n python3-%{srcname}
f172162
%{desc}
f172162
f172162
f172162
%prep
f172162
%autosetup -n %{srcname}
f172162
cp -v %{SOURCE1} .
f172162
cp -v %{SOURCE2} .
f172162
f172162
%build
f172162
# Nothing to do
f172162
f172162
%install
f172162
# Put things where they belong
f172162
install -D -m 0644 %{srcname}.py -t %{buildroot}/%{python3_sitelib}/
f172162
%if %{with py2}
f172162
install -D -m 0644 %{srcname}.py -t %{buildroot}/%{python2_sitelib}/
f172162
%endif
f172162
f172162
%check
f172162
# No tests
f172162
f172162
%if %{with py2}
f172162
%files -n python2-%{srcname}
f172162
%license LICENSE.GPL
f172162
%doc gifti_write_example.py gifti_read_example.py
f172162
%{python2_sitelib}/%{srcname}.py
f172162
%{python2_sitelib}/%{srcname}.pyc
f172162
%{python2_sitelib}/%{srcname}.pyo
f172162
%endif
f172162
f172162
%files -n python3-%{srcname}
f172162
%license LICENSE.GPL
f172162
%doc gifti_write_example.py gifti_read_example.py
f172162
%{python3_sitelib}/%{srcname}.py
073709f
%{python3_sitelib}/__pycache__/%{srcname}.cpython-3*.opt-1.pyc
073709f
%{python3_sitelib}/__pycache__/%{srcname}.cpython-3*.pyc
f172162
f172162
%changelog
531d449
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-9
531d449
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
531d449
1e91fc8
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-8
1e91fc8
- Rebuilt for Python 3.9
1e91fc8
ee5db81
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-7
ee5db81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ee5db81
36c722a
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-6
36c722a
- Rebuilt for Python 3.8.0rc1 (#1748018)
36c722a
4c60565
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-5
4c60565
- Rebuilt for Python 3.8
4c60565
8950809
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-4
8950809
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
8950809
017d622
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
017d622
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
017d622
073709f
* Mon Nov 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.0.4-2
073709f
- Fix file list to cater to different py3 versions
073709f
f172162
* Sun Nov 18 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.0.4-1
f172162
- Only install py2 files conditionally
f172162
- Initial build
f172162
- Correct license