Blame SPECS/python-ncclient.spec

rdobuilder b82cd7
## START: Set by rpmautospec
rdobuilder b82cd7
## (rpmautospec version 0.2.6)
rdobuilder b82cd7
%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
rdobuilder b82cd7
    release_number = 3;
rdobuilder b82cd7
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
rdobuilder b82cd7
    print(release_number + base_release_number - 1);
rdobuilder b82cd7
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
rdobuilder b82cd7
## END: Set by rpmautospec
rdobuilder b82cd7
rdobuilder b82cd7
# Sphinx-generated HTML documentation is not suitable for packaging; see
rdobuilder b82cd7
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
rdobuilder b82cd7
#
rdobuilder b82cd7
# We can generate PDF documentation as a substitute.
rdobuilder b82cd7
%bcond_with doc_pdf
rdobuilder b82cd7
rdobuilder b82cd7
Name:           python-ncclient
rdobuilder b82cd7
Version:        0.6.13
rdobuilder b82cd7
Release:        %autorelease
rdobuilder b82cd7
Summary:        Python library for the NETCONF protocol
rdobuilder b82cd7
rdobuilder b82cd7
License:        ASL 2.0
rdobuilder b82cd7
URL:            https://github.com/ncclient/ncclient
rdobuilder b82cd7
Source0:        %{url}/archive/v%{version}/ncclient-%{version}.tar.gz
rdobuilder b82cd7
rdobuilder b82cd7
BuildArch:      noarch
rdobuilder b82cd7
rdobuilder b82cd7
BuildRequires:  python3-devel
rdobuilder b82cd7
BuildRequires:  pyproject-rpm-macros
rdobuilder b82cd7
rdobuilder b82cd7
%global common_description %{expand:
rdobuilder b82cd7
ncclient is a Python library that facilitates client-side scripting and
rdobuilder b82cd7
application development around the NETCONF protocol. ncclient was developed by
rdobuilder b82cd7
Shikar Bhushan.net). It is now maintained by Leonidas Poulopoulos (@leopoul)
rdobuilder b82cd7
and Einar Nilsen-Nygaard (@einarnn).
rdobuilder b82cd7
rdobuilder b82cd7
Docs: http://ncclient.readthedocs.org
rdobuilder b82cd7
rdobuilder b82cd7
PyPI: https://pypi.python.org/pypi/ncclient}
rdobuilder b82cd7
rdobuilder b82cd7
%description %{common_description}
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%package -n python3-ncclient
rdobuilder b82cd7
Summary:        %{summary}
rdobuilder b82cd7
rdobuilder b82cd7
%description -n python3-ncclient %{common_description}
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%package doc
rdobuilder b82cd7
Summary:        Documentation and examples for python-ncclient
rdobuilder b82cd7
rdobuilder b82cd7
%if %{with doc_pdf}
rdobuilder b82cd7
BuildRequires:  make
rdobuilder b82cd7
BuildRequires:  python3-sphinx-latex
rdobuilder b82cd7
BuildRequires:  latexmk
rdobuilder b82cd7
%endif
rdobuilder b82cd7
rdobuilder b82cd7
%description doc
rdobuilder b82cd7
The python-ncclient-doc package contains detailed documentation and examples
rdobuilder b82cd7
for python-ncclient.
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%prep
rdobuilder b82cd7
%autosetup -n ncclient-%{version}
rdobuilder b82cd7
%py3_shebang_fix examples
rdobuilder b82cd7
rdobuilder b82cd7
# Keep a dependency on deprecated python3dist(nose) from being generated.
rdobuilder b82cd7
# Upstream still prefers to use nose, but the tests have been adjusted so that
rdobuilder b82cd7
# it is no longer required.
rdobuilder b82cd7
sed -r -i '/^nose\b/d' test-requirements.txt
rdobuilder b82cd7
# Don’t generate dependencies on unnecessary linting and test coverage
rdobuilder b82cd7
# dependencies, either.
rdobuilder b82cd7
sed -r -i '/^(flake8|pytest-cov)\b/d' test-requirements.txt
rdobuilder b82cd7
rdobuilder b82cd7
# Loosen exact-version doc dependencies
rdobuilder b82cd7
sed -r -i 's/==/>=/' docs/requirements.txt
rdobuilder b82cd7
# Drop intersphinx mappings, since we can’t download remote inventories and
rdobuilder b82cd7
# can’t easily produce working hyperlinks from inventories in local
rdobuilder b82cd7
# documentation packages.
rdobuilder b82cd7
echo 'intersphinx_mapping.clear()' >> docs/conf.py
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%generate_buildrequires
rdobuilder b82cd7
%pyproject_buildrequires -t %{?with_doc_pdf:docs/requirements.txt}
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%build
rdobuilder b82cd7
%pyproject_wheel
rdobuilder b82cd7
rdobuilder b82cd7
%if %{with doc_pdf}
rdobuilder b82cd7
%make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}'
rdobuilder b82cd7
# There is an escaping problem we haven’t traced to its root cause. In the list
rdobuilder b82cd7
# of authors, “\and” is emitted, and then “\a” is interpreted as the backslash
rdobuilder b82cd7
# escape for the ASCII BEL (bell) character. This then breaks the LaTeX build.
rdobuilder b82cd7
# Find it and fix it after generating the LaTeX source and before building it.
rdobuilder b82cd7
sed -r -i 's/\x07nd/and/g' docs/build/latex/ncclient.tex
rdobuilder b82cd7
%make_build -C docs/build/latex LATEXMKOPTS='-quiet'
rdobuilder b82cd7
%endif
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%install
rdobuilder b82cd7
%pyproject_install
rdobuilder b82cd7
%pyproject_save_files ncclient
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%check
rdobuilder b82cd7
%tox
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%files -n python3-ncclient -f %{pyproject_files}
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%files doc
rdobuilder b82cd7
%license LICENSE
rdobuilder b82cd7
%doc Changelog
rdobuilder b82cd7
%doc NOTICE
rdobuilder b82cd7
%doc README.md
rdobuilder b82cd7
%doc README.rst
rdobuilder b82cd7
%if %{with doc_pdf}
rdobuilder b82cd7
%doc docs/build/latex/ncclient.pdf
rdobuilder b82cd7
%endif
rdobuilder b82cd7
%doc examples
rdobuilder b82cd7
rdobuilder b82cd7
rdobuilder b82cd7
%changelog
rdobuilder b82cd7
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.6.13-3
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> 0.6.13-2
rdobuilder b82cd7
- Rebuilt for Python 3.11
rdobuilder b82cd7
rdobuilder b82cd7
* Mon Apr 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.13-1
rdobuilder b82cd7
- Update to 0.6.13 (close RHBZ#2073846)
rdobuilder b82cd7
rdobuilder b82cd7
* Mon Apr 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-17
rdobuilder b82cd7
- Generate doc dependencies from requirements file
rdobuilder b82cd7
rdobuilder b82cd7
* Mon Apr 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-16
rdobuilder b82cd7
- Drop “forge” macros, since they don’t benefit us much
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.6.12-15
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jan 07 2022 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-14
rdobuilder b82cd7
- Drop intersphinx mappings
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Dec 17 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-13
rdobuilder b82cd7
- Avoid generating several unnecessary BuildRequires
rdobuilder b82cd7
rdobuilder b82cd7
* Sat Nov 27 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-12
rdobuilder b82cd7
- Tweak a spec file comment
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Nov 26 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-11
rdobuilder b82cd7
- Reduce LaTeX PDF build verbosity
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Sep 30 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-10
rdobuilder b82cd7
- Generate PDF instead of HTML Sphinx documentation.
rdobuilder b82cd7
rdobuilder b82cd7
* Mon Sep 13 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-9
rdobuilder b82cd7
- Let pyproject-rpm-macros handle the license file
rdobuilder b82cd7
rdobuilder b82cd7
* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-8
rdobuilder b82cd7
- Drop BR on pyproject-rpm-macros, now implied by python3-devel
rdobuilder b82cd7
rdobuilder b82cd7
* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-7
rdobuilder b82cd7
- Reduce macro indirection in the spec file
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Jul 27 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-6
rdobuilder b82cd7
- Use forgeautosetup macro
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Jul 27 2021 Benjamin A. Beasley <code@musicinmybrain.net> 0.6.12-5
rdobuilder b82cd7
- Move %%generate_buildrequires after %%prep to make the spec file easier
rdobuilder b82cd7
  to follow
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> 0.6.12-4
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.6.12-2
rdobuilder b82cd7
- Rebuilt for Python 3.10
rdobuilder b82cd7
rdobuilder b82cd7
* Sun May 30 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.12-1
rdobuilder b82cd7
- Update to 0.6.12
rdobuilder b82cd7
rdobuilder b82cd7
* Sat May 29 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.11-1
rdobuilder b82cd7
- Update to 0.6.11
rdobuilder b82cd7
- Drop upstreamed patches
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Mar 16 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.10-2
rdobuilder b82cd7
- Patch out BR on deprecated python3-mock
rdobuilder b82cd7
- Patch out BR on deprecated python3-nose
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Mar 16 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.10-1
rdobuilder b82cd7
- Update to 0.16.10
rdobuilder b82cd7
- Drop python-ncclient-0.6.9-shebangs.patch, now upstreamed
rdobuilder b82cd7
- Drop python3dist(setuptools) BR, redundant with pyproject-rpm-macros
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Mar 02 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.9-2
rdobuilder b82cd7
- Rebuild for fixed RHBZ#1925963 in pyproject-rpm-macros-0-38
rdobuilder b82cd7
- Enable parallel Sphinx build
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jan  1 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.6.9-1
rdobuilder b82cd7
- Prepare for unretirement
rdobuilder b82cd7
- New upstream version 0.6.9
rdobuilder b82cd7
- Migrate from Python 2 to Python 3
rdobuilder b82cd7
- Use new macros for source URL and build/install/test sections, and drop old
rdobuilder b82cd7
  macros like python_provide
rdobuilder b82cd7
- Use generated Requires and BuildRequires
rdobuilder b82cd7
- Split documentation and examples into a separate -doc subpackage
rdobuilder b82cd7
rdobuilder b82cd7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-8
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-7
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Jan 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.4.7-6
rdobuilder b82cd7
- Update Python 2 dependency declarations to new packaging standards
rdobuilder b82cd7
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
rdobuilder b82cd7
rdobuilder b82cd7
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4.7-5
rdobuilder b82cd7
- Python 2 binary package renamed to python2-ncclient
rdobuilder b82cd7
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-4
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-3
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
rdobuilder b82cd7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
rdobuilder b82cd7
rdobuilder b82cd7
* Tue Mar 08 2016 Ihar Hrachyshka <ihrachys@redhat.com> 0.4.7-1.el7
rdobuilder b82cd7
- Update to 0.4.7
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-4
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3
rdobuilder b82cd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
rdobuilder b82cd7
rdobuilder b82cd7
* Fri Dec  5 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.4.2-2
rdobuilder b82cd7
- Added missing python-setuptools as a build dependency.
rdobuilder b82cd7
- Include documentation and examples.
rdobuilder b82cd7
- Run unit tests on build.
rdobuilder b82cd7
- Rebuild egg file.
rdobuilder b82cd7
- Added python2 macros needed for el6.
rdobuilder b82cd7
- Made python macros more specific (python -> python2).
rdobuilder b82cd7
- Made python2_sitelib file inclusion wildcard a bit more strict.
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Dec  4 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.4.2-1
rdobuilder b82cd7
- Updated to upstream 0.4.2 version
rdobuilder b82cd7
rdobuilder b82cd7
* Thu Aug  7 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.4.1-1
rdobuilder b82cd7
- Initial package for Fedora
rdobuilder b82cd7