summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2021-01-02 19:57:18 +0800
committerUniversebenzene2021-01-02 19:57:18 +0800
commit4ae93d7ff1fef2c4b0e2135cb250d9389ef26714 (patch)
tree2a346017a33212ddac4a17c557d77267bdd46775
downloadaur-4ae93d7ff1fef2c4b0e2135cb250d9389ef26714.tar.gz
Initial import 0.5
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD57
-rw-r--r--fix_sphinx-doc_link.patch10
4 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..442431008be
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = python-echo
+ pkgdesc = Callback Properties in Python
+ pkgver = 0.5
+ pkgrel = 1
+ url = https://echo.readthedocs.io
+ arch = any
+ license = MIT
+ checkdepends = python-pytest-cov
+ makedepends = python-setuptools-scm
+ makedepends = python-numpy
+ makedepends = python-sphinx-automodapi
+ makedepends = python-numpydoc
+ makedepends = python-qtpy
+ makedepends = python-pyqt5
+ source = https://files.pythonhosted.org/packages/source/e/echo/echo-0.5.tar.gz
+ source = fix_sphinx-doc_link.patch
+ md5sums = ca4de86da2a113db50ac0f4ec6f044ee
+ md5sums = b6441be6fa18db4f59a7784b1fcc67a6
+
+pkgname = python-echo
+ depends = python>=3.6
+ depends = python-numpy
+ depends = python-qtpy
+ optdepends = python-pyqt5>=5.9
+ optdepends = python-echo-doc: Documentation for python-echo
+
+pkgname = python-echo-doc
+ pkgdesc = Documentation for Python echo module
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..e896dcd6056
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+src
+pkg
+*.src.tar.gz
+*.tar.gz
+*.tar.bz2
+*.part
+*.pkg.tar.*
+*.log
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..922f993fe6b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python-echo
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python-${_pyname}"-doc)
+pkgver=0.5
+pkgrel=1
+pkgdesc="Callback Properties in Python"
+arch=('any')
+url="https://echo.readthedocs.io"
+license=('MIT')
+makedepends=('python-setuptools-scm' 'python-numpy' 'python-sphinx-automodapi' 'python-numpydoc' 'python-qtpy' 'python-pyqt5')
+checkdepends=('python-pytest-cov')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'fix_sphinx-doc_link.patch')
+md5sums=('ca4de86da2a113db50ac0f4ec6f044ee'
+ 'b6441be6fa18db4f59a7784b1fcc67a6')
+
+prepare() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ patch -Np1 -i "${srcdir}/fix_sphinx-doc_link.patch"
+}
+
+build() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build
+
+ msg "Building Docs"
+ python setup.py build_sphinx
+
+}
+
+check() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ pytest || warning "Tests failed"
+}
+
+package_python-echo() {
+ depends=('python>=3.6' 'python-numpy' 'python-qtpy')
+ optdepends=('python-pyqt5>=5.9'
+ 'python-echo-doc: Documentation for python-echo')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}
+
+package_python-echo-doc() {
+ pkgdesc="Documentation for Python echo module"
+ cd ${srcdir}/${_pyname}-${pkgver}/build/sphinx
+
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../LICENSE
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}
diff --git a/fix_sphinx-doc_link.patch b/fix_sphinx-doc_link.patch
new file mode 100644
index 00000000000..fd97a291fe9
--- /dev/null
+++ b/fix_sphinx-doc_link.patch
@@ -0,0 +1,10 @@
+--- a/doc/conf.py 2020-09-08 21:30:18.000000000 +0800
++++ b/doc/conf.py 2021-01-02 19:05:35.582692558 +0800
+@@ -275,6 +275,6 @@
+ # Intersphinx options
+ intersphinx_cache_limit = 10 # days to keep the cached inventories
+ intersphinx_mapping = {
+- 'sphinx': ('http://www.sphinx-doc.org/en/latest/', None),
++ 'sphinx': ('http://www.sphinx-doc.org/en/master/', None),
+ 'python': ('https://docs.python.org/3.6', None),
+ }