96df7f8
%global module_name abimap
96df7f8
96df7f8
Name:           python-%{module_name}
8d18367
Version:        0.3.2
13685a2
Release:        19%{?dist}
96df7f8
License:        MIT
96df7f8
Summary:        A helper for library maintainers to use symbol versioning
96df7f8
Url:            https://github.com/ansasaki/abimap
96df7f8
96df7f8
Source:         https://files.pythonhosted.org/packages/source/a/%{module_name}/%{module_name}-%{version}.tar.gz
96df7f8
96df7f8
# This patch disables the test which depends on pytest-console-scripts
96df7f8
Patch0:         python-abimap-0.3.0-disable-script-test.patch
6b555ec
# This patch removes sphinx napoleon extension
6b555ec
Patch1:         python-abimap-0.3.1-remove-docs-napoleon.patch
6b555ec
# This patch removes sphinx rtd theme
6b555ec
Patch2:         python-abimap-0.3.1-remove-docs-rtd-theme.patch
96df7f8
96df7f8
BuildArch:      noarch
7e38877
BuildRequires: make
6b555ec
BuildRequires:  python%{python3_pkgversion}-devel
6b555ec
BuildRequires:  python%{python3_pkgversion}-setuptools
96df7f8
# Required for testing
6b555ec
BuildRequires:  python%{python3_pkgversion}-pytest
6b555ec
BuildRequires:  python%{python3_pkgversion}-pytest-runner
6b555ec
BuildRequires:  python%{python3_pkgversion}-pytest-cov
96df7f8
# Not available yet, will be required once it is available in Fedora
96df7f8
# BuildRequires:  %%{py3_dist pytest-console-scripts}
6b555ec
6b555ec
%if 0%{?el7}
6b555ec
BuildRequires:  python%{python3_pkgversion}-yaml
6b555ec
# Required for documentation
6b555ec
BuildRequires:  python-sphinx
6b555ec
%else
6b555ec
BuildRequires:  python%{python3_pkgversion}-pyyaml
96df7f8
# Required for documentation
6b555ec
BuildRequires:  python%{python3_pkgversion}-sphinx
6b555ec
%endif
96df7f8
6b555ec
Requires:       setuptools
292bfd9
96df7f8
%description
96df7f8
This script allows to generate and update symbol version linker scripts which
96df7f8
adds version information to the exported symbols. The script is intended to be
96df7f8
integrated as part of a shared library build to check for changes in the set
96df7f8
of exported symbols and update the symbol version linker script accordingly.
96df7f8
6b555ec
%package -n python%{python3_pkgversion}-%{module_name}
96df7f8
Summary:        A helper for library maintainers to use symbol versioning
6b555ec
%{?python_provide:%python_provide python%{python3_pkgversion}-%{module_name}}
96df7f8
6b555ec
%description -n python%{python3_pkgversion}-%{module_name}
96df7f8
This script allows to generate and update symbol version linker scripts which
96df7f8
adds version information to the exported symbols. The script is intended to be
96df7f8
integrated as part of a shared library build to check for changes in the set
96df7f8
of exported symbols and update the symbol version linker script accordingly.
96df7f8
96df7f8
%package -n python-%{module_name}-doc
96df7f8
Summary:        Documentation for python-%{module_name}
96df7f8
%description -n python-%{module_name}-doc
96df7f8
Documentation for python-%{module_name}
96df7f8
96df7f8
%prep
96df7f8
%autosetup -n %{module_name}-%{version} -p1
96df7f8
# Remove bundled egg-info
96df7f8
rm -rf %{module_name}.egg-info
96df7f8
96df7f8
%build
96df7f8
%py3_build
6b555ec
%if 0%{?el7}
6b555ec
# Generate html docs
6b555ec
PYTHONPATH=${PWD}/src:${PWD}/tests \
6b555ec
    sphinx-build -E -b html docs html
6b555ec
# Generate manpage
6b555ec
PYTHONPATH=${PWD}/src:${PWD}/tests \
6b555ec
    sphinx-build -E -b man docs man
6b555ec
# Remove the sphinx-build leftovers
6b555ec
rm -rf html/.{doctrees,buildinfo}
6b555ec
%else
96df7f8
# Generate html docs
96df7f8
PYTHONPATH=${PWD}/src:${PWD}/tests \
bb6fe78
    sphinx-build-3 -E -b html docs html
bb6fe78
# Generate manpage
bb6fe78
PYTHONPATH=${PWD}/src:${PWD}/tests \
bb6fe78
    sphinx-build-3 -E -b man docs man
96df7f8
# Remove the sphinx-build leftovers
96df7f8
rm -rf html/.{doctrees,buildinfo}
6b555ec
%endif
96df7f8
96df7f8
%install
96df7f8
%py3_install
96df7f8
# Install man page
96df7f8
mkdir -p %{buildroot}%{_mandir}/man1
bb6fe78
install ${PWD}/man/abimap.1 %{buildroot}%{_mandir}/man1/abimap.1
96df7f8
96df7f8
%check
96df7f8
# Generate test data (copied bootstrap-tests from Makefile)
96df7f8
make -C tests ABIMAP_NAME_VERSION="abimap-%{version}" ABIMAP_VERSION="%{version}"
96df7f8
# Run the tests using py.test
96df7f8
PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests \
96df7f8
    py.test-%{python3_version} -vv tests
96df7f8
6b555ec
%files -n python%{python3_pkgversion}-%{module_name}
96df7f8
%license LICENSE
96df7f8
%doc AUTHORS.rst CHANGELOG.rst README.rst
96df7f8
%{_bindir}/abimap
96df7f8
%dir %{python3_sitelib}/abimap
96df7f8
%{python3_sitelib}/abimap/*
96df7f8
%{python3_sitelib}/abimap-%{version}-py%{python3_version}.egg-info
96df7f8
%{_mandir}/man1/abimap.1*
96df7f8
96df7f8
%files -n python-%{module_name}-doc
96df7f8
%license LICENSE
96df7f8
%doc html
96df7f8
96df7f8
%changelog
13685a2
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.3.2-19
13685a2
- Rebuilt for Python 3.13
13685a2
a7379c9
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-18
a7379c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
a7379c9
c382dbe
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-17
c382dbe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
c382dbe
5af7fc4
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-16
5af7fc4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
5af7fc4
4cd8d1b
* Tue Jul 11 2023 Anderson Toshiyuki Sasaki <ansasaki> - 0.3.2-15
4cd8d1b
- Migrated to SPDX license
4cd8d1b
dd3dfae
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.3.2-14
dd3dfae
- Rebuilt for Python 3.12
dd3dfae
e5ab96f
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-13
e5ab96f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
e5ab96f
400f2e4
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-12
400f2e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
400f2e4
c35a576
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.3.2-11
c35a576
- Rebuilt for Python 3.11
c35a576
3cfabf4
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-10
3cfabf4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
3cfabf4
ba40690
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-9
ba40690
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
ba40690
44b3ca2
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.3.2-8
44b3ca2
- Rebuilt for Python 3.10
44b3ca2
ee34c89
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-7
ee34c89
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ee34c89
7432b48
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-6
7432b48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7432b48
04b52e8
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-5
04b52e8
- Rebuilt for Python 3.9
04b52e8
2ed4c8d
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-4
2ed4c8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2ed4c8d
6da1cb0
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-3
6da1cb0
- Rebuilt for Python 3.8.0rc1 (#1748018)
6da1cb0
00cf631
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-2
00cf631
- Rebuilt for Python 3.8
00cf631
8d18367
* Mon Aug 05 2019 Anderson Sasaki <ansasaki@redhat.com> - 0.3.2-1
8d18367
- Update to upstream version 0.3.2
8d18367
- Fixed broken builds due to changes in warning output
8d18367
- Changed tests to check error messages
8d18367
- Added python 3.7 to testing matrix
8d18367
- Added requirement to verify SNI when checking URLs in docs
8d18367
7f0707f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-4
7f0707f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7f0707f
078a1c0
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-3
078a1c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
078a1c0
6b555ec
* Thu Sep 27 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.3.1-2
6b555ec
- Make the specfile compatible with EPEL7
6b555ec
- Fixed incompatible macros
6b555ec
- Fixed patch to skip a test in older pytest versions
6b555ec
- Added patches to remove sphinx extensions not available in EPEL7
6b555ec
bb6fe78
* Mon Aug 20 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.3.1-1
bb6fe78
- Rebased to version 0.3.1
bb6fe78
- argparse-manpage is no longer required since manpage is generated by sphinx
bb6fe78
292bfd9
* Wed Aug 08 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.3.0-2
292bfd9
- Added Requires for setuptools
292bfd9
- Addressed a bug in the order of releases in output map
292bfd9
96df7f8
* Mon Aug 06 2018 Anderson Sasaki <ansasaki@redhat.com> - 0.3.0-1
96df7f8
- Initial package.