File papis.spec of Package papis
#
# spec file for package papis
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: papis
Version: 0.13
Release: 0
Summary: Command-line based document and bibliography manager
License: GPL-3.0-only
URL: https://github.com/papis/papis
Source: https://github.com/papis/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM mark-network-tests.patch mcepl@suse.com
# to skip test which require network access
Patch0: mark-network-tests.patch
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-setuptools
BuildRequires: zsh
Requires: python3-PyYAML >= 3.12
Requires: python3-arxiv2bib >= 1.0.7
Requires: python3-beautifulsoup4 >= 4.4.1
Requires: python3-bibtexparser >= 0.6.2
Requires: python3-chardet >= 3.0.2
Requires: python3-click >= 7.0.0
Requires: python3-colorama >= 0.2
Requires: python3-dominate
Requires: python3-filetype >= 1.0.1
Requires: python3-habanero >= 0.6.0
Requires: python3-isbnlib >= 3.9.1
Requires: python3-lxml >= 4.3.5
Requires: python3-prompt_toolkit >= 2.0.5
Requires: python3-pygments >= 2.2.0
Requires: python3-pyparsing >= 2.2.0
Requires: python3-python-doi >= 0.1.1
Requires: python3-python-slugify >= 1.2.6
Requires: python3-requests >= 2.11.1
Requires: python3-stevedore >= 1.30
Requires: python3-tqdm >= 4.1
Requires: python3-typing-extensions >= 3.7
Suggests: python3-Whoosh >= 2.7.4
Suggests: python3-sphinx-click
Suggests: python3-sphinx_rtd_theme
BuildArch: noarch
# SECTION test requirements
BuildRequires: python3-PyYAML >= 3.12
BuildRequires: python3-Whoosh
BuildRequires: python3-arxiv2bib >= 1.0.7
BuildRequires: python3-beautifulsoup4 >= 4.4.1
BuildRequires: python3-bibtexparser >= 0.6.2
BuildRequires: python3-chardet >= 3.0.2
BuildRequires: python3-click >= 7.0.0
BuildRequires: python3-colorama >= 0.2
BuildRequires: python3-dominate
BuildRequires: python3-filetype >= 1.0.1
BuildRequires: python3-habanero >= 0.6.0
BuildRequires: python3-isbnlib >= 3.9.1
BuildRequires: python3-lxml >= 4.3.5
BuildRequires: python3-pip
BuildRequires: python3-prompt_toolkit >= 2.0.5
BuildRequires: python3-pygments >= 2.2.0
BuildRequires: python3-pyparsing >= 2.2.0
BuildRequires: python3-pytest
BuildRequires: python3-python-doi >= 0.1.1
BuildRequires: python3-python-slugify >= 1.2.6
BuildRequires: python3-requests >= 2.11.1
BuildRequires: python3-stevedore >= 1.30
BuildRequires: python3-tqdm >= 4.1
BuildRequires: python3-typing-extensions >= 3.7
BuildRequires: python3-wheel
# /SECTION
%description
Powerful and highly extensible command-line based document and bibliography manager
%prep
%autosetup -p1 -n papis-%{version}
sed -i -e '/^[[:space:]]*--cov=papis/d' setup.cfg
%build
%python3_pyproject_wheel
%install
%python3_pyproject_install
# Packaged via other means
rm -v %{buildroot}%{_datadir}/doc/papis/{AUTHORS,CHANGELOG.md,LICENSE,README.rst}
%fdupes %{buildroot}%{python3_sitelib}
%check
# Networked tests skipped
pytest -v --ignore=setup.py --ignore=papis/downloaders/* --ignore=papis/docmatcher.py \
--ignore=papis/downloaders/thesesfr.py -k 'not network' tests/
%files
%doc AUTHORS CHANGELOG.md README.rst
%license LICENSE
%{_bindir}/papis
%{python_sitelib}/papis
%{python_sitelib}/papis-%{version}*-info
%dir %{_datadir}/bash-completion
%{_datadir}/bash-completion/completions/papis.bash
%dir %{_datadir}/applications
%{_datadir}/applications/papis.desktop
# %%{_mandir}/man1/papis*
%dir %{_datadir}/zsh/site-functions/
%{_datadir}/zsh/site-functions/_papis
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/papis.fish
%changelog