Blame python-positional.spec

1f5bdfe
%global pypi_name positional
1f5bdfe
1f5bdfe
%if 0%{?fedora}
1f5bdfe
%global with_python3 1
1f5bdfe
%endif
1f5bdfe
1f5bdfe
Name:           python-%{pypi_name}
1f5bdfe
Version:        1.0.1
b908eb4
Release:        4%{?dist}
1f5bdfe
Summary:        Library to enforce positional or keyword arguments
1f5bdfe
1f5bdfe
License:        ASL 2.0
1f5bdfe
URL:            https://github.com/morganfainberg/positional
1f5bdfe
Source0:        https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
1f5bdfe
BuildArch:      noarch
1f5bdfe
1f5bdfe
BuildRequires:  git
1f5bdfe
1f5bdfe
%description
1f5bdfe
A decorator which enforces only some args may be passed positionally.x
1f5bdfe
1f5bdfe
1f5bdfe
%package -n     python2-%{pypi_name}
1f5bdfe
Summary:        Library to enforce positional or keyword arguments
1f5bdfe
%{?python_provide:%python_provide python2-%{pypi_name}}
1f5bdfe
1f5bdfe
BuildRequires:  python2-devel
1f5bdfe
BuildRequires:  python-setuptools
1f5bdfe
BuildRequires:  python-pbr >= 1.8
1f5bdfe
BuildRequires:  python-sphinx
1f5bdfe
1f5bdfe
%description -n python2-%{pypi_name}
1f5bdfe
A decorator which enforces only some args may be passed positionally.
1f5bdfe
1f5bdfe
%if 0%{?with_python3}
1f5bdfe
%package -n     python3-%{pypi_name}
1f5bdfe
Summary:        Library to enforce positional or keyword arguments
1f5bdfe
%{?python_provide:%python_provide python3-%{pypi_name}}
1f5bdfe
1f5bdfe
BuildRequires:  python3-devel
1f5bdfe
BuildRequires:  python3-setuptools
1f5bdfe
BuildRequires:  python3-pbr >= 1.8
1f5bdfe
BuildRequires:  python3-sphinx
1f5bdfe
1f5bdfe
%description -n python3-%{pypi_name}
1f5bdfe
A decorator which enforces only some args may be passed positionally.
1f5bdfe
%endif
1f5bdfe
1f5bdfe
%package -n python-%{pypi_name}-doc
1f5bdfe
Summary:        Python positional documentation
1f5bdfe
%description -n python-%{pypi_name}-doc
1f5bdfe
Documentation for positional
1f5bdfe
1f5bdfe
%prep
1f5bdfe
%autosetup -n %{pypi_name}-%{version} -S git
1f5bdfe
# Remove bundled egg-info
1f5bdfe
rm -rf %{pypi_name}.egg-info
1f5bdfe
1f5bdfe
1f5bdfe
%build
1f5bdfe
%py2_build
1f5bdfe
%if 0%{?with_python3}
1f5bdfe
%py3_build
1f5bdfe
%endif
1f5bdfe
# generate html docs
1f5bdfe
sphinx-build doc/source html
1f5bdfe
pushd html
1f5bdfe
iconv -f iso8859-1 -t utf-8 objects.inv > objects.conv && mv -f objects.conv objects.inv
1f5bdfe
popd
1f5bdfe
# remove the sphinx-build leftovers
1f5bdfe
rm -rf html/.{doctrees,buildinfo}
1f5bdfe
1f5bdfe
%install
1f5bdfe
# Must do the subpackages' install first because the scripts in /usr/bin are
1f5bdfe
# overwritten with every setup.py install.
1f5bdfe
%if 0%{?with_python3}
1f5bdfe
%py3_install
1f5bdfe
%endif
1f5bdfe
%py2_install
1f5bdfe
1f5bdfe
1f5bdfe
%files -n python2-%{pypi_name}
1f5bdfe
%doc README.rst
1f5bdfe
%license LICENSE
1f5bdfe
%{python2_sitelib}/%{pypi_name}
1f5bdfe
%{python2_sitelib}/%{pypi_name}-*-py?.?.egg-info
1f5bdfe
1f5bdfe
%if 0%{?with_python3}
1f5bdfe
%files -n python3-%{pypi_name}
1f5bdfe
%doc README.rst
1f5bdfe
%license LICENSE
1f5bdfe
%{python3_sitelib}/%{pypi_name}
1f5bdfe
%{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info
1f5bdfe
%endif
1f5bdfe
1f5bdfe
%files -n python-%{pypi_name}-doc
1f5bdfe
%doc html
1f5bdfe
1f5bdfe
%changelog
b908eb4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-4
b908eb4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b908eb4
dd3e308
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
dd3e308
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
dd3e308
1f5bdfe
* Mon Jan 25 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.0.1-2
1f5bdfe
- Fix minor rpmlint warnings
1f5bdfe
1f5bdfe
* Mon Jan 25 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.0.1-1
1f5bdfe
- Initial package.