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
|
|
|
#
|
2023-03-06 07:53:43 +01:00
|
|
|
# Copyright (c) 2023 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
|
|
|
|
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
|
2021-09-14 10:43:15 +02:00
|
|
|
BuildRequires: fdupes
|
2022-04-25 09:46:04 +02:00
|
|
|
BuildRequires: python3-curses
|
2021-11-27 14:31:19 +01:00
|
|
|
BuildRequires: python3-mobi
|
2022-04-25 09:46:04 +02:00
|
|
|
BuildRequires: python3-pip
|
|
|
|
BuildRequires: python3-poetry-core
|
|
|
|
BuildRequires: python3-pytest
|
2021-11-27 14:31:19 +01:00
|
|
|
BuildRequires: python3-setuptools
|
2022-04-25 09:46:04 +02:00
|
|
|
BuildRequires: python3-wheel
|
|
|
|
Requires: python3-curses
|
2021-09-14 10:43:15 +02:00
|
|
|
Requires: python3-mobi
|
|
|
|
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
|
2022-04-25 09:46:04 +02:00
|
|
|
python3 -mpip wheel --no-deps --disable-pip-version-check --use-pep517 \
|
|
|
|
--no-build-isolation --progress-bar off --verbose . -w build/
|
2021-09-14 10:43:15 +02:00
|
|
|
|
|
|
|
%install
|
2022-04-25 09:46:04 +02:00
|
|
|
python3 -mpip install --root %{buildroot} --no-warn-script-location \
|
|
|
|
--disable-pip-version-check --no-compile --no-deps --progress-bar off \
|
|
|
|
build/epy_reader-*-py3-none-any.whl
|
|
|
|
|
|
|
|
%check
|
|
|
|
export PYTHONPATH=%{buildroot}/%{python3_sitelib}
|
|
|
|
pytest -v tests
|
2021-09-14 10:43:15 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/epy
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|