-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Change the update source from AUR to GitHub Signed-off-by: Roald Clark <[email protected]>
- Loading branch information
1 parent
60f4445
commit 4640ca0
Showing
4 changed files
with
1,180 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Maintainer: Roald Clark <[email protected]> | ||
# Contributor: Gesh <[email protected]> | ||
# Maintainer: Stefan Gehr <[email protected]> | ||
# Contributor: Stefan Gehr <[email protected]> | ||
|
||
pkgname=papis | ||
pkgver=0.13 | ||
|
@@ -8,8 +9,9 @@ pkgdesc="Command-line document and bibliography manager" | |
arch=('any') | ||
url="https://github.com/papis/papis" | ||
license=('GPL-3.0-or-later') | ||
depends=('python' | ||
'python-arxiv2bib' | ||
depends=( | ||
'python' | ||
'python-arxiv' | ||
'python-beautifulsoup4' | ||
'python-bibtexparser' | ||
'python-click' | ||
|
@@ -20,66 +22,91 @@ depends=('python' | |
'python-habanero' | ||
'python-isbnlib' | ||
'python-lxml' | ||
'python-platformdirs' | ||
'python-prompt_toolkit' | ||
'python-pygments' | ||
'python-pyparsing' | ||
'python-requests' | ||
'python-slugify' | ||
'python-stevedore' | ||
'python-tqdm' | ||
'python-typing_extensions' | ||
'python-yaml' | ||
) | ||
optdepends=( | ||
'fzf: fzf picker' | ||
'papis-rofi: integration with rofi' | ||
'papis-zotero: imports from zotero' | ||
'pdfjs: pdf reader in the web app' | ||
'python-chardet: improved encoding autodetection when scraping' | ||
'python-jinja: jinja formatting' | ||
'python-papis-scihub: imports from scihub' | ||
'python-markdownify: convert zenodo imports to markdown' | ||
'python-whoosh: whoosh database backend' | ||
'python-docutils: for papis.sphinx_ext (used by some plugins)' | ||
'python-sphinx: for papis.sphinx_ext (used by some plugins)' | ||
'python-sphinx-click: for papis.sphinx_ext (used by some plugins)' | ||
'python-pytest: for papis.testing (used by some plugins)' | ||
) | ||
makedepends=( | ||
'python-build' | ||
'python-hatchling' | ||
'python-installer' | ||
'python-wheel' | ||
|
||
'python-setuptools' | ||
'python-sphinx' | ||
'python-sphinx-click' | ||
'python-sphinx-design' | ||
'python-wheel' | ||
) | ||
checkdepends=( | ||
'python-pytest' | ||
'python-pytest-cov' | ||
|
||
# These are optional -- if they're not installed, papis will automatically | ||
# skip these tests -- and are only necessary if you intend to use the | ||
# optdeps as well | ||
'python-chardet' | ||
'python-jinja' | ||
'python-markdownify' | ||
'python-whoosh' | ||
) | ||
optdepends=( | ||
# Alternative pickers | ||
'fzf: alternative picker' | ||
'papis-rofi: alternative picker' | ||
|
||
# Integrations | ||
'git: integration with git' | ||
'papis-zotero: imports from zotero' | ||
'python-papis-scihub: imports from scihub' | ||
|
||
# Internally-optional features | ||
# papis doesn't make use of the system installation of pdfjs, instead | ||
# requiring an installation in $XDG_CONFIG_HOME. | ||
# see https://github.com/papis/papis/issues/946 | ||
# 'pdfjs: pdf reader in the web app' | ||
'python-chardet: improved encoding autodetection when scraping' | ||
'python-jinja: jinja formatting' | ||
'python-markdownify: convert zenodo imports to markdown' | ||
'python-whoosh: whoosh database backend' | ||
|
||
# Plugin helpers used by some plugins | ||
'python-docutils: for papis.sphinx_ext (used by some plugins)' | ||
'python-pytest: for papis.testing (used by some plugins)' | ||
'python-sphinx-click: for papis.sphinx_ext (used by some plugins)' | ||
'python-sphinx: for papis.sphinx_ext (used by some plugins)' | ||
) | ||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" | ||
"papis-014-fix-tests.patch") | ||
b2sums=('efff09aeaaacf170ef5c01170f1c856dbe09566096deb7ae649bfe755d58f225467241464e4b4bf8f36c25898fc7e9f689358073ab45e81d651defd127729af3' | ||
'e5d54a0c766e8f9fa7d014483e089701202f93530aec0a8d67732688790e395d4b1aab85fe18f7ebc6a97a3ab3a7da9724a0a6315685da3bc8a3450b80d0b973') | ||
|
||
prepare() { | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
patch -Np1 -i ../papis-014-fix-tests.patch | ||
|
||
source=("${pkgname}-${pkgver}::${url}/archive/refs/tags/v${pkgver}.tar.gz") | ||
b2sums=('efff09aeaaacf170ef5c01170f1c856dbe09566096deb7ae649bfe755d58f225467241464e4b4bf8f36c25898fc7e9f689358073ab45e81d651defd127729af3') | ||
python -m build --wheel --no-isolation | ||
python -m installer --destdir=tmp_test_install dist/*.whl | ||
local site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') | ||
export PYTHONPATH="${PWD}/tmp_test_install${site_packages}:${PYTHONPATH}" | ||
export PATH="${PWD}/tmp_test_install/usr/bin:${PATH}" | ||
make -C doc man | ||
} | ||
|
||
build() { | ||
cd "${pkgname}-${pkgver}" | ||
python -m build --wheel --no-isolation | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
python -m build --wheel --no-isolation | ||
} | ||
|
||
check() { | ||
cd "${pkgname}-${pkgver}" | ||
python -m pytest papis tests \ | ||
-k 'not (test_config.py and test_get_configuration) and not (test_arxiv.py and test_general)' | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
python -m pytest papis tests | ||
} | ||
|
||
package() { | ||
cd "${pkgname}-${pkgver}" | ||
python -m installer --destdir="$pkgdir" dist/*.whl | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
python -m installer --destdir="${pkgdir}" dist/*.whl | ||
} | ||
|
||
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.