Blob Blame Raw
%global srcname clint

Name:           python-%{srcname}
Version:        0.5.1
Release:        15%{?dist}
Summary:        A set of awesome tools for developing commandline applications

License:        ISC
URL:            https://github.com/kennethreitz/%{srcname}
Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
Patch0:         0001-Adjust-imports-to-avoid-using-vendored-packages.patch
Patch1:         0002-Remove-vendored-packages.patch

BuildArch:      noarch

%description
Clint is a module filled with a set of awesome tools for developing commandline
applications. It supports colors, but detects if the session is a TTY, so
doesn't render the colors if you're piping stuff around. Automagically.

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

%description -n python3-%{srcname}
Clint is a module filled with a set of awesome tools for developing commandline
applications. It supports colors, but detects if the session is a TTY, so
doesn't render the colors if you're piping stuff around. Automagically.


%package doc
Summary: Documentation for python-clint
BuildRequires:  python3-sphinx

%description doc
Documentation for the python2-clint and python3-clint packages.
Clint is a module filled with a set of awesome tools for developing commandline
applications. It supports colors, but detects if the session is a TTY, so
doesn't render the colors if you're piping stuff around. Automagically.


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


%build
%py3_build

make %{?_smp_mflags} -C docs SPHINXBUILD=sphinx-build-3 html
make %{?_smp_mflags} -C docs SPHINXBUILD=sphinx-build-3 man
rm docs/_build/html/.buildinfo


%install
%py3_install

install -p -D -T -m 0644 docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1


# check
# No tests are currently provided in a tagged release by upstream


%files -n python3-%{srcname}
%license LICENSE
%doc README.rst HISTORY.rst AUTHORS
%{python3_sitelib}/*


%files doc
%license LICENSE
%doc README.rst HISTORY.rst AUTHORS
%doc %{_mandir}/man1/%{srcname}.1*
%doc docs/_build/html


%changelog
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hron훾ok <mhroncok@redhat.com> - 0.5.1-14
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hron훾ok <mhroncok@redhat.com> - 0.5.1-13
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hron훾ok <mhroncok@redhat.com> - 0.5.1-9
- Rebuilt for Python 3.7

* Sat Mar 24 2018 Jeremy Cline <jeremy@jcline.org> - 0.5.1-8
- Drop Python 2 sub-package as it is unused

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hron훾ok <mhroncok@redhat.com> - 0.5.1-4
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Jul 13 2016 Jeremy Cline <jeremy@jcline.org> - 0.5.1-2
- Leave inter-sphinx inventory file in the doc package
- Explicitly depend on setuptools

* Tue Jul 05 2016 Jeremy Cline <jeremy@jcline.org> - 0.5.1-1
- Initial commit