summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcell Meszaros2024-04-16 05:06:26 +0200
committerMarcell Meszaros2024-04-16 05:06:26 +0200
commit8df820b2bed174da8c93f54e7ccf79b62883381c (patch)
tree8b29d947132f4a7b811b763746c4f7f427a1e030
parent231ab64ee38e1a84292b4e5063e5ab4a10908a80 (diff)
downloadaur-python-pickledb.tar.gz
0.9.3.r13.g68b24d6-1: update to latest patched version, use setuptools instead of distutils, implement testing
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore18
-rw-r--r--LICENSE26
-rw-r--r--PKGBUILD98
4 files changed, 87 insertions, 81 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6c8c8ef90377..fb9c2ae2d49d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,18 @@
pkgbase = python-pickledb
- pkgdesc = pickleDB is lightweight, fast, and simple database based on Python’s own json module
- pkgver = 0.9.2
+ pkgdesc = A lightweight, fast and simple database based on Python’s own json module
+ pkgver = 0.9.3.r13.g68b24d6
pkgrel = 1
- url = http://packages.python.org/pickleDB/
+ url = https://pypi.org/project/pickleDB
arch = any
- license = BSD
+ license = BSD-3-Clause
+ checkdepends = python-pytest
+ makedepends = git
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
- makedepends = python2-setuptools
- source = https://pypi.python.org/packages/source/p/pickleDB/pickleDB-0.9.2.tar.gz
- source = LICENSE
- md5sums = 02babaf13cf10782175e3ec6e4d452a5
- md5sums = 173f7ea52700eee04c0d48eb75d6f1cf
+ makedepends = python-wheel
+ depends = python
+ source = pickledb::git+https://github.com/patx/pickledb.git#commit=68b24d6291a89923ae604feab1f8817d9b1792b6
+ b2sums = SKIP
pkgname = python-pickledb
- depends = python-simplejson
-
-pkgname = python2-pickledb
- depends = python2-simplejson
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..058ba2318df1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+# based on https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+*.tar
+*.tar.*
+*.rpm
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+
+*/
+*.orig
+*.bak
+*.backup
+*.kate-swp
+.directory
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 76e7c2730fd5..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Full License Text
-The BSD 3-Clause License The following is a BSD 3-Clause ("BSD New" or "BSD Simplified") license template. To generate your own license, change the values of OWNER, ORGANIZATION and YEAR from their original values as given here, and substitute your own.
-
-Note: You may omit clause 3 and still be OSD-conformant. Despite its colloquial name "BSD New", this is not the newest version of the BSD license; it was followed by the even newer BSD-2-Clause version, sometimes known as the "Simplified BSD License". On January 9th, 2008 the OSI Board approved BSD-2-Clause, which is used by FreeBSD and others. It omits the final "no-endorsement" clause and is thus roughly equivalent to the MIT License.
-
-Historical Background: The original license used on BSD Unix had four clauses. The advertising clause (the third of four clauses) required you to acknowledge use of U.C. Berkeley code in your advertising of any product using that code. It was officially rescinded by the Director of the Office of Technology Licensing of the University of California on July 22nd, 1999. He states that clause 3 is "hereby deleted in its entirety." The four clause license has not been approved by OSI. The license below does not contain the advertising clause.
-
-This prelude is not part of the license.
-
-OWNER = Regents of the University of California
-
-ORGANIZATION = University of California, Berkeley
-
-YEAR = 1998
-
-In the original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS".
-
-License template
-Copyright (c) $YEAR $OWNER, All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/PKGBUILD b/PKGBUILD
index 3aba50686385..3e82c63fd625 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,55 +1,71 @@
-# $Id$
-# Maintainer: Matteo Triggiani <davvore33@gmail.com>
-# Contributor:
-pkgname=('python-pickledb' 'python2-pickledb')
-pkgver=0.9.2
+# Maintainer:
+# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
+# Contributor: Matteo Triggiani <davvore33@gmail.com>
+
+_pypiname='pickleDB'
+_distname='pickledb'
+pkgname=python-${_distname}
+pkgver=0.9.3.r13.g68b24d6
pkgrel=1
-pkgdesc='pickleDB is lightweight, fast, and simple database based on Python’s own json module'
-url='http://packages.python.org/pickleDB/'
+_commit_untagged_v_0_9_3=0c62055d29faba4a410016df7b5fe31ad7811801
+_commit_current=68b24d6291a89923ae604feab1f8817d9b1792b6
+pkgdesc='A lightweight, fast and simple database based on Python’s own json module'
+url="https://pypi.org/project/${_pypiname}"
+_repourl="https://github.com/patx/${_distname}"
arch=('any')
-license=('BSD')
-makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.python.org/packages/source/p/pickleDB/pickleDB-$pkgver.tar.gz" "LICENSE")
-md5sums=('02babaf13cf10782175e3ec6e4d452a5' '173f7ea52700eee04c0d48eb75d6f1cf')
-prepare() {
- cp -r "pickleDB-$pkgver" "python-pickledb-$pkgver"
- cp -r "pickleDB-$pkgver" "python2-pickledb-$pkgver"
-}
+license=('BSD-3-Clause')
+depends=(
+ 'python'
+)
+makedepends=(
+ 'git'
+ 'python-build'
+ 'python-installer'
+ 'python-setuptools'
+ 'python-wheel'
+)
+checkdepends=(
+ 'python-pytest'
+)
+source=("${_distname}::git+${_repourl}.git#commit=${_commit_current}")
+b2sums=('SKIP')
-build_python-pickledb() {
- cd "$pkgname-$pkgver"
+prepare() {
+ cd "${_distname}"
+ git tag -f v0.9.3 "${_commit_untagged_v_0_9_3}"
- python setup.py build
+ sed -e "s/from distutils.core import setup/from setuptools import setup/" \
+ -i setup.py
}
-build_python2-pickledb() {
- cd "$pkgname-$pkgver"
+pkgver() {
+ cd "${_distname}"
- python2 setup.py build
-}
+ # Generate git tag based version. Count only proper (v)#.#* [#=number] tags.
+ local _gitversion=$(git describe --long --tags --match '[v0-9][0-9.][0-9.]*' | sed -e 's|^v||' | tr '[:upper:]' '[:lower:]')
-check_python-pickledb() {
- cd "$pkgname-$pkgver"
- python setup.py test
-
- cd "$pkgname-$pkgver"
- python2 setup.py test
+ # Format git-based version for pkgver
+ # Expected format: e.g. 1.5.0rc2.r521.g99982a1c
+ # Or in case of 'post': 1.5.0.post1.r521.g99982a1c
+ echo "${_gitversion}" | sed \
+ -e 's;^\([0-9][0-9.]*\)[-_.]\([a-zA-Z]\+\);\1\2;' \
+ -e 's;\([0-9]\+-g\);r\1;' \
+ -e 's;-;.;g' \
+ -e 's;\(post.*\);\.\1;'
}
-package_python-pickledb() {
- depends=('python-simplejson')
- cd "$pkgname-$pkgver"
-
- python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
- install -Dm644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+build() {
+ cd "${_distname}"
+ python -m build --wheel --no-isolation
}
-package_python2-pickledb() {
- depends=('python2-simplejson')
- cd "$pkgname-$pkgver"
-
- python2 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+check() {
+ cd "${_distname}"
+ pytest tests.py -v
}
-# vim:set ts=2 sw=2 et:
+package() {
+ cd "${_distname}"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+}