Blame SPECS/python-ncclient.spec

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