5d56ea5
# Initially created by pyp2rpm-3.3.2
5d56ea5
%global pypi_name webscrapbook
5d56ea5
1dcbd0b
# Temporarily using `devel` branch sources to pick up fixes for
1dcbd0b
# broken tests
1dcbd0b
# See: https://github.com/danny0838/PyWebScrapBook/issues/79
1dcbd0b
%global gitdate 20240526
1dcbd0b
%global gitref 48ad89d28e811fe4fc633e5071bd874c76caddee
1dcbd0b
%global shortref %(echo %{gitref} |cut -c1-8)
1dcbd0b
1dcbd0b
%if 0%{?shortref:1}
1dcbd0b
%global buildref .%{gitdate}git%{shortref}
1dcbd0b
%endif
1dcbd0b
1dcbd0b
%if 0%{?gitref:1}
1dcbd0b
%global archivename PyWebScrapBook-%{gitref}
1dcbd0b
%global dlpath archive/%{gitref}.tar.gz
1dcbd0b
%else
1dcbd0b
%global archivename PyWebScrapBook-%{version}
1dcbd0b
%global dlpath releases/download/v%{version}/%{archivename}.tar.gz
1dcbd0b
%endif
1dcbd0b
1dcbd0b
5d56ea5
Name:           python-%{pypi_name}
1dcbd0b
Version:        2.3.3
2548d14
Release:        0.2%{?buildref}%{?dist}
5d56ea5
Summary:        A backend toolkit for management of WebScrapBook collection
5d56ea5
5d56ea5
License:        MIT
5d56ea5
URL:            https://github.com/danny0838/PyWebScrapBook
1dcbd0b
Source0:        %{url}/%{dlpath}#/%{archivename}.tar.gz
b6824b1
b6824b1
# Downstream Fedora patch to comply with packaging guidelines
1dcbd0b
Patch100:       python-webscrapbook-2.3.2-disable-linters.patch
b6824b1
5d56ea5
BuildArch:      noarch
b6824b1
BuildRequires:  python3-devel
ab3d75c
# For mime.types
ab3d75c
BuildRequires:  mailcap
b6824b1
b6824b1
b6824b1
%global _description %{expand:
b6824b1
PyWebScrapBook is a command line toolkit and backend server for the
b6824b1
WebScrapBook browser extension.
5d56ea5
b6824b1
Features: Host any directory as a website; HTZ or MAFF archive file viewing;
b6824b1
Markdown file rendering; Directory listing; Create, view, edit, and/or delete
b6824b1
files via the web page or API; HTTP(S) authorization.}
5d56ea5
5d56ea5
%description %_description
5d56ea5
b6824b1
%package -n     python3-%{pypi_name}
5d56ea5
Summary:        %{summary}
b6824b1
Recommends:     python3-%{pypi_name}+adhoc_ssl
5d56ea5
 
b6824b1
%description -n python3-%{pypi_name} %_description
b6824b1
b6824b1
%pyproject_extras_subpkg -n python3-%{pypi_name} adhoc_ssl
5d56ea5
26f5e10
5d56ea5
%prep
1dcbd0b
%autosetup -p1 -n %{archivename}
b6824b1
b6824b1
%generate_buildrequires
b6824b1
%pyproject_buildrequires -t
5d56ea5
5d56ea5
%build
b6824b1
%pyproject_wheel
5d56ea5
5d56ea5
%install
b6824b1
%pyproject_install
b6824b1
b6824b1
%pyproject_save_files webscrapbook
5d56ea5
b6824b1
%check
b6824b1
%tox
b6824b1
b6824b1
b6824b1
%files -n python3-%{pypi_name} -f %{pyproject_files}
5d56ea5
%doc README.md
5d56ea5
%{_bindir}/webscrapbook
5d56ea5
%{_bindir}/wsb
5d56ea5
%{_bindir}/wsbview
5d56ea5
5d56ea5
%changelog
2548d14
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 2.3.3-0.2.20240526git48ad89d2
2548d14
- Rebuilt for Python 3.13
2548d14
1dcbd0b
* Thu May 23 2024 FeRD (Frank Dana) <ferdnyc@gmail.com> - 2.3.3-0.1
1dcbd0b
- New upstream release
1dcbd0b
1728aa8
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-4
1728aa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
1728aa8
8861653
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-3
8861653
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
8861653
2025e00
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-2
2025e00
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
2025e00
ab3d75c
* Thu Jul 06 2023 FeRD (Frank Dana) <ferdnyc@gmail.com> - 1.16.0-1
ab3d75c
- New upstream release
e9c2d18
- Add mailcap as build requirement (for mime.types, needed by tests)
ab3d75c
88ddf30
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.15.0-2
88ddf30
- Rebuilt for Python 3.12
88ddf30
b6824b1
* Wed May 31 2023 FeRD (Frank Dana) <ferdnyc@gmail.com> - 1.15.0-1
b6824b1
- New upstream release
b6824b1
- Convert spec file to pyproject_* RPM macros
b6824b1
- Actually use automatic build dependency generator
b6824b1
- Enable tests
b6824b1
c185c42
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
c185c42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
c185c42
6f5739a
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
6f5739a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
6f5739a
fca9445
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.0-3
fca9445
- Rebuilt for Python 3.11
fca9445
802faf8
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
802faf8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
802faf8
7cb89fc
* Wed Jan 12 2022 FeRD (Frank Dana) <ferdnyc@gmail.com> - 1.1.0-1
6d868f2
- New upstream release
6d868f2
- NOTE: As of release 1.0.0 support for legacy ScrapBook data is removed.
6d868f2
  ScrapBook-format data can be converted using the 'wsb convert sb2wsb'
6d868f2
  and 'wsb convert migrate' commands.
6d868f2
9ca234d
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.33.4-3
9ca234d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9ca234d
b82085a
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.33.4-2
b82085a
- Rebuilt for Python 3.10
b82085a
f561188
* Tue Feb 23 2021 FeRD (Frank Dana) <ferdnyc@gmail.com> - 0.33.4-1
f561188
- New upstream release
f561188
- Main package Recommends adhoc_ssl extra
f561188
e2b7899
* Tue Feb 23 2021 Miro Hrončok <mhroncok@redhat.com> - 0.33.3-2
e2b7899
- Add python3-webscrapbook+adhoc_ssl extras metapackage
e2b7899
26f5e10
* Mon Feb 15 2021 FeRD (Frank Dana) <ferdnyc@gmail.com> - 0.33.3-1
26f5e10
- New upstream release
26f5e10
- Drop sed command to remove shebangs (fixed upstream)
26f5e10
- Use auto-discovery for package dependencies
26f5e10
e5e7a1c
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.4-3
e5e7a1c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e5e7a1c
d8ecaa9
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.4-2
d8ecaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d8ecaa9
8777368
* Sat Jul 04 2020 FeRD (Frank Dana) <ferdnyc@gmail.com> - 0.15.4-1
8777368
- New upstream release
8777368
82ace83
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.2-3
82ace83
- Rebuilt for Python 3.9
82ace83
27c15af
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
27c15af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
27c15af
5d56ea5
* Fri Sep 06 2019 FeRD (Frank Dana) <ferdnyc@gmail.com> - 0.6.2-1
5d56ea5
- Initial Fedora package.