summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-02-08 23:30:08 -0600
committerLuis Martinez2022-02-08 23:30:08 -0600
commit0df5afdf3399b314bd5687129d720e0077bad611 (patch)
tree9a73a59729ecb78955e5b41ee247f44f6c0b007b
parent57856588af7bcb9994c9824a7fb8415d7fed09b9 (diff)
downloadaur-0df5afdf3399b314bd5687129d720e0077bad611.tar.gz
package rewrite
-rw-r--r--.SRCINFO17
-rw-r--r--001-setup.py.patch73
-rw-r--r--LICENSE19
-rw-r--r--PKGBUILD32
4 files changed, 123 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0b26286e9654..ef52ba5a0e80 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,20 @@
pkgbase = python-contexter
pkgdesc = Full replacement of the contextlib standard library module
pkgver = 0.1.4
- pkgrel = 1
+ pkgrel = 2
url = https://bitbucket.org/defnull/contexter
arch = any
license = MIT
+ makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-install
+ makedepends = python-wheel
depends = python
- source = https://files.pythonhosted.org/packages/source/c/contexter/contexter-0.1.4.tar.gz
- source = https://bitbucket.org/defnull/contexter/raw/37184b02cfa457a2541f27ca32241ea4c75a82bc/LICENSE.txt
- sha512sums = 85f6d0bf164bec4def05ba99a4759f1d0e0095b61015a8c429e2c249beb1407aef0294d259929043eda88f0c92dc7743fff91eda15d10700aa67a1bb117782db
- sha512sums = 8a4e46959d7522a993d636421d7fde1ffef5b4ba92ac86dd6b38cd707fed871761e18fee9e45281ddbfb39332593ee7a882291c8a5db1a714d3fb4d37bebed10
+ source = python-contexter-0.1.4.tar.gz::https://files.pythonhosted.org/packages/source/c/contexter/contexter-0.1.4.tar.gz
+ source = 001-setup.py.patch
+ source = LICENSE
+ sha256sums = c730890b1a915051414a6350d8ea1cddca7d01d8f756badedb30b9bf305ea0a8
+ sha256sums = dab8e575ca79aedfe49afe7e6d78f92c6d21c7321ae408db1ae2c63ba8154827
+ sha256sums = de6c16a58caef8f4cf4c3473c9308d1ddb2d029b8a31f73cb5a944f486f05343
pkgname = python-contexter
-
diff --git a/001-setup.py.patch b/001-setup.py.patch
new file mode 100644
index 000000000000..2108419dbf92
--- /dev/null
+++ b/001-setup.py.patch
@@ -0,0 +1,73 @@
+diff --git a/setup.py b/setup.py
+index 4e8e78a..2a49b6c 100755
+--- a/setup.py
++++ b/setup.py
+@@ -1,41 +1,34 @@
+ #!/usr/bin/env python
+
+-import sys
+-try:
+- from setuptools import setup
+-except ImportError:
+- from distutils.core import setup
+-
+-if sys.version_info < (2,5):
+- raise NotImplementedError("Sorry, you need at least Python 2.5 or Python 3.x")
++from setuptools import setup
+
+ import contexter
+
+-with contexter.Contexter() as ctx:
+- long_description = ''.join(ctx << open('README.rst'))
+-
+-setup(name='contexter',
+- version=contexter.__version__,
+- description=contexter.__doc__,
+- long_description=long_description,
+- author=contexter.__author__,
+- author_email='marc@gsites.de',
+- url='https://bitbucket.org/defnull/contexter',
+- py_modules=['contexter'],
+- license='MIT',
+- platforms = 'any',
+- classifiers=['Development Status :: 4 - Beta',
+- 'Intended Audience :: Developers',
+- 'License :: OSI Approved :: MIT License',
+- 'Programming Language :: Python :: 2.5',
+- 'Programming Language :: Python :: 2.6',
+- 'Programming Language :: Python :: 2.7',
+- 'Programming Language :: Python :: 3',
+- 'Programming Language :: Python :: 3.2',
+- 'Programming Language :: Python :: 3.3',
+- 'Programming Language :: Python :: 3.4',
+- ],
++with open('README.rst') as f:
++ long_description = f.read()
++
++setup(
++ name='contexter',
++ version=contexter.__version__,
++ description='Full replacement of the contextlib standard library module',
++ long_description=long_description,
++ author=contexter.__author__,
++ author_email='marc@gsites.de',
++ url='https://bitbucket.org/defnull/contexter',
++ py_modules=['contexter'],
++ license='MIT',
++ platforms = 'any',
++ python_requres='>=2.5',
++ classifiers=['Development Status :: 4 - Beta',
++ 'Intended Audience :: Developers',
++ 'License :: OSI Approved :: MIT License',
++ 'Programming Language :: Python :: 2.5',
++ 'Programming Language :: Python :: 2.6',
++ 'Programming Language :: Python :: 2.7',
++ 'Programming Language :: Python :: 3',
++ 'Programming Language :: Python :: 3.2',
++ 'Programming Language :: Python :: 3.3',
++ 'Programming Language :: Python :: 3.4',
++ ],
+ )
+
+-
+-
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..c99858affd78
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014-2017, Marcel Hellkamp.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 7119fea1f881..1b180ddcacae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,36 @@
-# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Daniel M. Capella <polyzen@archlinux.org>
-_name=contexter
pkgname=python-contexter
pkgver=0.1.4
-pkgrel=1
+pkgrel=2
pkgdesc='Full replacement of the contextlib standard library module'
arch=('any')
url=https://bitbucket.org/defnull/contexter
license=('MIT')
depends=('python')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
- 'https://bitbucket.org/defnull/contexter/raw/37184b02cfa457a2541f27ca32241ea4c75a82bc/LICENSE.txt')
-sha512sums=('85f6d0bf164bec4def05ba99a4759f1d0e0095b61015a8c429e2c249beb1407aef0294d259929043eda88f0c92dc7743fff91eda15d10700aa67a1bb117782db'
- '8a4e46959d7522a993d636421d7fde1ffef5b4ba92ac86dd6b38cd707fed871761e18fee9e45281ddbfb39332593ee7a882291c8a5db1a714d3fb4d37bebed10')
+makedepends=('python-setuptools' 'python-build' 'python-install' 'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/contexter/contexter-$pkgver.tar.gz"
+ '001-setup.py.patch'
+ 'LICENSE')
+sha256sums=('c730890b1a915051414a6350d8ea1cddca7d01d8f756badedb30b9bf305ea0a8'
+ 'dab8e575ca79aedfe49afe7e6d78f92c6d21c7321ae408db1ae2c63ba8154827'
+ 'de6c16a58caef8f4cf4c3473c9308d1ddb2d029b8a31f73cb5a944f486f05343')
+
+prepare() {
+ patch -p1 -d "contexter-$pkgver" < 001-setup.py.patch
+}
build() {
- cd $_name-$pkgver
- python setup.py build
+ cd "contexter-$pkgver"
+ python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
- cd $_name-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- install -Dm644 ../LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ export PYTHONHASHSEED=0
+ cd "contexter-$pkgver"
+ python -m install --optimize=1 --destdir="$pkgdir/" dist/*.whl
+ install -Dm644 "$srcdir/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}
# vim:set ts=2 sw=2 et: