Blob Blame History Raw
%global     srcname  rstcheck

Name:       python-%{srcname}
Version:    3.1
Release:    4%{?dist}
Summary:    Checks syntax of reStructuredText and code blocks nested within it

License:    MIT
URL:        https://github.com/myint/rstcheck
Source0:    https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz


BuildArch:  noarch
%description
Checks syntax of reStructuredText and code blocks nested within it.

%package -n python2-%{srcname}
BuildRequires:  python2-devel python2-docutils
BuildRequires:  python2-setuptools
Requires:   python2-docutils
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Checks syntax of reStructuredText and code blocks nested within it.


%package -n python3-%{srcname}
BuildRequires:  python3-devel python3-docutils
BuildRequires:  python3-setuptools
Requires:   python3-docutils
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Checks syntax of reStructuredText and code blocks nested within it.


%prep
%autosetup -n %{srcname}-%{version}
rm -frv %{srcname}.egg-info

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
%{__python2} setup.py test
%{__python3} setup.py test

%files -n python2-%{srcname}
%license LICENSE
%doc README.rst AUTHORS.rst
%{python2_sitelib}/%{srcname}-%{version}-py2.?.egg-info/
%{python2_sitelib}/%{srcname}.py*

%files -n python3-%{srcname}
%license LICENSE
%doc README.rst AUTHORS.rst
%{python3_sitelib}/%{srcname}-%{version}-py3.?.egg-info/
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/__pycache__/%{srcname}.*
%{_bindir}/%{srcname}

%changelog
* Fri Oct 27 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-4
- Updated as per final comments
- add missing BR
- make URL complete without macro
- correct file lists

* Thu Oct 26 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-3
- Update based on review comments
- Make BRs and Rs specific to sub packages
- Make file lists more specific
- Use summary macro

* Thu Oct 26 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-2
- No need to provide different binaries - they provide same functionality
- https://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin

* Wed Oct 25 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.1-1
- Initial rpmbuild