diff options
author | Matthew Gamble | 2020-12-12 11:14:27 +1100 |
---|---|---|
committer | Matthew Gamble | 2020-12-12 11:14:27 +1100 |
commit | 2e7b22319b30ce85bd289eb5ccf9abf6e26ba933 (patch) | |
tree | bad46a957a77e5df8aba6c81f0707e1bc1102ee6 | |
parent | 9b6a4dbe595f23b59ea0db8ab92f41577754cf16 (diff) | |
download | aur-2e7b22319b30ce85bd289eb5ccf9abf6e26ba933.tar.gz |
Update to version that supports python3 natively
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | python3-compat.patch | 40 |
4 files changed, 17 insertions, 65 deletions
@@ -1,17 +1,15 @@ pkgbase = python-usersettings - pkgdesc = Python module for easily managing persistent settings using an editable format and stored in an OS-appropriate location - pkgver = 1.0.7 - pkgrel = 4 + pkgdesc = Portable Local Settings Storage for Python + pkgver = 1.1.5 + pkgrel = 1 url = https://pypi.org/project/usersettings arch = any license = BSD makedepends = python-setuptools depends = python depends = python-appdirs - source = https://files.pythonhosted.org/packages/df/d3/b66294b2500f21fbeaa47e52bd5be90be3f2315e09bea2839ee0eeeb151b/usersettings-1.0.7.tar.gz - source = python3-compat.patch - sha256sums = c48c48f7bc1f00facc74da5ecfb6e1d95c66fc46d9e054c774958570f780d535 - sha256sums = 409b69dc535a380197635598ec86b14ee851b3cc8f41c6cc9d51297ce433cc08 + source = https://files.pythonhosted.org/packages/c3/f0/48410545aa632941da8d2874a5db3dba4c43d5dd26790a46e14a6c283ec1/usersettings-1.1.5.tar.gz + sha256sums = 9f84b282982622d8ebfd2d42b482317ae50fb2b3a7fba22e0b0c36cac61ad673 pkgname = python-usersettings diff --git a/.gitignore b/.gitignore index 2d72b4cd24ca..e38eb34d4ee1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.tar.gz -*.pkg.tar.xz /pkg/ /src/ +*.pkg.tar.* +*.tar.gz @@ -1,34 +1,28 @@ # Maintainer: Matthew Gamble <git@matthewgamble.net> pkgname=python-usersettings -pkgver=1.0.7 -pkgrel=4 -pkgdesc="Python module for easily managing persistent settings using an editable format and stored in an OS-appropriate location" -arch=('any') +pkgver=1.1.5 +pkgrel=1 +pkgdesc="Portable Local Settings Storage for Python " +arch=("any") url="https://pypi.org/project/usersettings" license=("BSD") depends=("python" "python-appdirs") makedepends=("python-setuptools") source=( - "https://files.pythonhosted.org/packages/df/d3/b66294b2500f21fbeaa47e52bd5be90be3f2315e09bea2839ee0eeeb151b/usersettings-1.0.7.tar.gz" - "python3-compat.patch" + "https://files.pythonhosted.org/packages/c3/f0/48410545aa632941da8d2874a5db3dba4c43d5dd26790a46e14a6c283ec1/usersettings-1.1.5.tar.gz" ) sha256sums=( - "c48c48f7bc1f00facc74da5ecfb6e1d95c66fc46d9e054c774958570f780d535" - "409b69dc535a380197635598ec86b14ee851b3cc8f41c6cc9d51297ce433cc08" + "9f84b282982622d8ebfd2d42b482317ae50fb2b3a7fba22e0b0c36cac61ad673" ) -prepare() { - cd "usersettings-${pkgver}" - patch < "${srcdir}/python3-compat.patch" -} - package() { cd "usersettings-${pkgver}" + python setup.py install --root="${pkgdir}" --optimize=1 for _file in $(ls -1 docs/*); do - install -Dm644 ${_file} "${pkgdir}/usr/share/doc/python-usersettings/$(basename ${_file})" + install -Dm644 "${_file}" "${pkgdir}/usr/share/doc/python-usersettings/$(basename ${_file})" done - install -dm755 "${pkgdir}/usr/share/licenses/python-usersettings" - mv "${pkgdir}/usr/share/doc/python-usersettings/LICENSE.txt" "${pkgdir}/usr/share/licenses/python-usersettings" + + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-usersettings/LICENSE.txt" } diff --git a/python3-compat.patch b/python3-compat.patch deleted file mode 100644 index ff5192d30362..000000000000 --- a/python3-compat.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7a99d79e0be98dfca01d8a7780a83580c1f8c94f Mon Sep 17 00:00:00 2001 -From: Zach Deibert <zachdeibert@gmail.com> -Date: Mon, 2 Jul 2018 10:26:15 -0500 -Subject: [PATCH] Added Python 3 support - ---- - usersettings.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/usersettings.py b/usersettings.py -index bf46267..8331b67 100644 ---- a/usersettings.py -+++ b/usersettings.py -@@ -3,7 +3,10 @@ - Provide interface for persistent portable editable user settings - """ - import os --import ConfigParser -+try: -+ import ConfigParser -+except ImportError: -+ import configparser as ConfigParser - import ast - - import appdirs -@@ -75,12 +78,12 @@ def load_settings(self): - def save_settings(self): - """ Write the settings data to disk """ - if not os.path.exists(self.settings_directory): -- os.makedirs(self.settings_directory, 0755) -+ os.makedirs(self.settings_directory, 0o755) - parser = ConfigParser.RawConfigParser() - parser.add_section('settings') - for key, value in self.items(): - parser.set('settings', key, value) -- with open(self.settings_file, 'wb') as settings_fp: -+ with open(self.settings_file, 'w') as settings_fp: - parser.write(settings_fp) - - def __getattr__(self, setting_name): |