2021-09-14 10:43:15 +02:00
|
|
|
#
|
2021-11-27 14:31:19 +01:00
|
|
|
# spec file for package epy
|
2021-09-14 10:43:15 +02:00
|
|
|
#
|
2024-01-13 23:10:49 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2021-09-14 10:43:15 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2021-11-27 14:31:19 +01:00
|
|
|
|
2024-01-13 23:10:49 +01:00
|
|
|
%global pythons python311
|
|
|
|
%{?sle15_python_module_pythons}
|
2021-09-14 10:43:15 +02:00
|
|
|
Name: epy
|
2023-03-06 07:53:43 +01:00
|
|
|
Version: 2022.12.11+git.1675870044.c7a87f3
|
2021-09-14 10:43:15 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: CLI ebook reader
|
2021-11-27 14:31:19 +01:00
|
|
|
License: GPL-3.0-only
|
2021-09-14 10:43:15 +02:00
|
|
|
URL: https://github.com/wustho/epy
|
2021-11-27 14:34:19 +01:00
|
|
|
# Source: https://files.pythonhosted.org/packages/source/e/epy-reader/epy-reader-%%{version}.tar.gz#/epy-%%{version}.tar.gz
|
2022-10-06 00:21:15 +02:00
|
|
|
Source: epy-%{version}.tar.xz
|
2024-01-13 23:10:49 +01:00
|
|
|
BuildRequires: %{python_module curses}
|
|
|
|
BuildRequires: %{python_module mobi}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module poetry-core}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2021-09-14 10:43:15 +02:00
|
|
|
BuildRequires: fdupes
|
2024-01-13 23:10:49 +01:00
|
|
|
Requires: python311-curses
|
|
|
|
Requires: python311-mobi
|
2021-09-14 10:43:15 +02:00
|
|
|
Suggests: dictd
|
2021-12-20 20:40:25 +01:00
|
|
|
Suggests: mimic
|
2022-04-25 09:46:04 +02:00
|
|
|
Suggests: sdcv
|
2021-09-14 10:43:15 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
CLI Ebook reader. Fork of epr with these extra features:
|
|
|
|
|
|
|
|
Supported formats:
|
|
|
|
Epub (.epub, .epub3)
|
|
|
|
FictionBook (.fb2)
|
|
|
|
Mobi (.mobi)
|
|
|
|
AZW3 (.azw3), some but not all
|
|
|
|
|
|
|
|
Reading progress percentage
|
|
|
|
Bookmarks
|
|
|
|
External dictionary integration (sdcv or dict)
|
2022-04-25 09:46:04 +02:00
|
|
|
Inline formats: bold and italic (depend on terminal and font
|
|
|
|
capability. Italic only supported in python>=3.7)
|
2021-09-14 10:43:15 +02:00
|
|
|
Text-to-Speech (with additional setup)
|
|
|
|
Double Spread
|
|
|
|
|
|
|
|
%prep
|
2021-11-27 14:31:19 +01:00
|
|
|
%autosetup -p1 -n epy-%{version}
|
2021-09-14 10:43:15 +02:00
|
|
|
|
2022-01-08 08:39:58 +01:00
|
|
|
# All those shebangs are just harmful
|
2022-04-25 09:46:04 +02:00
|
|
|
find . -name \*.py -print0 | while IFS= read -r -d $'\0' script; do
|
|
|
|
sed -i "1{/#!\s*\/usr\/bin\/\(env \)\?python/d}" "$script"
|
|
|
|
chmod -x "$script"
|
|
|
|
done
|
2022-01-08 08:39:58 +01:00
|
|
|
|
2021-09-14 10:43:15 +02:00
|
|
|
%build
|
2024-01-13 23:10:49 +01:00
|
|
|
python3.11 -mpip wheel --no-deps --disable-pip-version-check --use-pep517 \
|
2022-04-25 09:46:04 +02:00
|
|
|
--no-build-isolation --progress-bar off --verbose . -w build/
|
2021-09-14 10:43:15 +02:00
|
|
|
|
|
|
|
%install
|
2024-01-13 23:10:49 +01:00
|
|
|
python3.11 -mpip install --root %{buildroot} --no-warn-script-location \
|
2022-04-25 09:46:04 +02:00
|
|
|
--disable-pip-version-check --no-compile --no-deps --progress-bar off \
|
|
|
|
build/epy_reader-*-py3-none-any.whl
|
|
|
|
|
|
|
|
%check
|
2023-12-29 05:12:25 +01:00
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
2024-01-13 23:10:49 +01:00
|
|
|
export PYTHONPATH=%{buildroot}/%{python311_sitelib}
|
|
|
|
python3.11 -m pytest -v tests
|
2021-09-14 10:43:15 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/epy
|
2024-01-13 23:10:49 +01:00
|
|
|
%{python311_sitelib}/*
|
2021-09-14 10:43:15 +02:00
|
|
|
|
|
|
|
%changelog
|