initial import
This commit is contained in:
51
python-pyparsing/PKGBUILD
Normal file
51
python-pyparsing/PKGBUILD
Normal file
@@ -0,0 +1,51 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=python-pyparsing
|
||||
pkgname=('python-pyparsing' 'tauthon-pyparsing')
|
||||
pkgver=2.4.7
|
||||
pkgrel=3
|
||||
arch=('any')
|
||||
license=('Expat')
|
||||
url='https://github.com/pyparsing/pyparsing/'
|
||||
makedepends=('python' 'tauthon')
|
||||
source=("https://github.com/pyparsing/pyparsing/archive/pyparsing_$pkgver.tar.gz"
|
||||
"fix-build-without-setuptools.patch")
|
||||
sha512sums=('c7a546729f86a2b5176e2482b566b9fd715b03e495aaef4d720b21307bb03f385dbc849247f8d266cb3d92be0a83c34ce4995b655ce85318355d5a0d42d6991e'
|
||||
'12d9a4d00e5e748147723f593e30ad03eba3351d6c6e031d315e880b63c81b87e6e39de1247855a0a2721fc68325db66464635128028fe515da7128e8aca8ac8')
|
||||
|
||||
prepare() {
|
||||
mv "pyparsing-pyparsing_$pkgver" "pyparsing-$pkgver"
|
||||
cd "$srcdir/pyparsing-$pkgver"
|
||||
patch -Np1 -i ${srcdir}/fix-build-without-setuptools.patch
|
||||
cp -a "$srcdir"/pyparsing-$pkgver{,-tauthon}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/pyparsing-$pkgver"
|
||||
python setup.py build
|
||||
|
||||
cd "$srcdir/pyparsing-$pkgver-tauthon"
|
||||
tauthon setup.py build
|
||||
}
|
||||
|
||||
package_python-pyparsing() {
|
||||
pkgdesc='General parsing module for Python'
|
||||
depends=('python')
|
||||
|
||||
cd "$srcdir/pyparsing-$pkgver"
|
||||
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
package_tauthon-pyparsing() {
|
||||
pkgdesc='General parsing module for Tauthon'
|
||||
depends=('tauthon')
|
||||
|
||||
cd "$srcdir/pyparsing-$pkgver-tauthon"
|
||||
|
||||
tauthon setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
18
python-pyparsing/fix-build-without-setuptools.patch
Normal file
18
python-pyparsing/fix-build-without-setuptools.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/setup.py 2020-03-30 02:51:27.000000000 +0200
|
||||
+++ b/setup.py 2024-11-10 04:28:38.030413040 +0100
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
"""Setup script for the pyparsing module distribution."""
|
||||
|
||||
-from setuptools import setup
|
||||
from pyparsing import __version__ as pyparsing_version
|
||||
from io import open
|
||||
|
||||
+try:
|
||||
+ from setuptools import setup
|
||||
+except ImportError:
|
||||
+ from distutils.core import setup
|
||||
+
|
||||
# The directory containing this file
|
||||
README_name = __file__.replace("setup.py", "README.rst")
|
||||
|
||||
Reference in New Issue
Block a user