Skip to content

Commit

Permalink
papis: update_on github
Browse files Browse the repository at this point in the history
- Change the update source from AUR to GitHub

Signed-off-by: Roald Clark <[email protected]>
  • Loading branch information
roaldclark committed Jan 9, 2025
1 parent 60f4445 commit 4640ca0
Show file tree
Hide file tree
Showing 4 changed files with 1,180 additions and 37 deletions.
93 changes: 60 additions & 33 deletions archlinuxcn/papis/PKGBUILD
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
Expand All @@ -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'
Expand All @@ -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:
11 changes: 7 additions & 4 deletions archlinuxcn/papis/lilac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_prefix: extra-x86_64
pre_build_script: aur_pre_build(maintainers=['BoostCookie', 'gesh'])
post_build: aur_post_build
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
post_build: git_pkgbuild_commit
repo_depends:
- python-arxiv
- python-doi
Expand All @@ -10,8 +10,11 @@ repo_makedepends:
- python-markdownify
- python-sphinx_design
update_on:
- source: aur
aur: papis
- source: github
github: papis/papis
use_latest_release: true
include_regex: '^v\d+\.\d+$'
prefix: 'v'
- alias: python
- source: manual
manual: 1
Expand Down
Binary file removed archlinuxcn/papis/papis-0.13
Binary file not shown.
Loading

0 comments on commit 4640ca0

Please sign in to comment.