[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2022-08-30 Thread Levente Polyak via arch-commits
Date: Tuesday, August 30, 2022 @ 18:33:44
  Author: anthraxx
Revision: 1288921

upgpkg: python-yara 4.2.3-1

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |   27 ++-
 1 file changed, 18 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2022-08-30 18:31:06 UTC (rev 1288920)
+++ PKGBUILD2022-08-30 18:33:44 UTC (rev 1288921)
@@ -3,8 +3,8 @@
 
 _gitname=yara-python
 pkgname=python-yara
-pkgver=4.2.0
-_gitcommit=0a8659d68ba486286b6d5b7c7f48d171beb78e03
+pkgver=4.2.3
+_gitcommit=8106b84fa967bcd2fff4f5a40e558c36bb8d54e8
 pkgrel=1
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
@@ -11,7 +11,8 @@
 arch=('x86_64')
 license=('Apache')
 depends=('python' 'yara' 'libyara.so' 'glibc')
-makedepends=('git' 'python-setuptools')
+makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 
'python-setuptools')
+checkdepends=('python-pytest')
 
source=(${pkgname}::git+"https://github.com/VirusTotal/${_gitname}#commit=${_gitcommit};)
 sha512sums=('SKIP')
 
@@ -20,21 +21,29 @@
   git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
 }
 
+prepare() {
+  cd ${pkgname}
+  mkdir -p tests
+  mv tests.py tests
+}
+
 build() {
   cd ${pkgname}
-  python setup.py build --dynamic-linking
+  python -m build --wheel --no-isolation \
+-C--global-option=build_ext \
+-C--global-option=--dynamic-linking
 }
 
 check() {
-  cd ${pkgname}
-  local PYTHONVERSION="$(python -c 'import sys; 
print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
-  PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
-python tests.py
+  cd ${pkgname}/tests
+  local PYTHONVERSION="$(python -c 'import sys; 
print("{}{}".format(sys.version_info.major, sys.version_info.minor))')"
+  PYTHONPATH="$PWD/../build/lib.linux-${CARCH}-cpython-${PYTHONVERSION}" \
+pytest tests.py
 }
 
 package() {
   cd ${pkgname}
-  python setup.py install --root="${pkgdir}" -O1 --skip-build
+  python -m installer --destdir="$pkgdir" dist/*.whl
   install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
   ln -s /usr/share/doc/yara/docs "${pkgdir}/usr/share/doc/${pkgname}/docs"
 }



[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2022-05-06 Thread Levente Polyak via arch-commits
Date: Friday, May 6, 2022 @ 23:20:18
  Author: anthraxx
Revision: 1196092

upgpkg: python-yara 4.2.0-1

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2022-05-06 23:18:47 UTC (rev 1196091)
+++ PKGBUILD2022-05-06 23:20:18 UTC (rev 1196092)
@@ -3,9 +3,9 @@
 
 _gitname=yara-python
 pkgname=python-yara
-pkgver=4.1.0
-_gitcommit=dc838e211e45442d219012099aaa63efa812c4be
-pkgrel=3
+pkgver=4.2.0
+_gitcommit=0a8659d68ba486286b6d5b7c7f48d171beb78e03
+pkgrel=1
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')



[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2021-12-01 Thread Felix Yan via arch-commits
Date: Wednesday, December 1, 2021 @ 21:31:34
  Author: felixonmars
Revision: 1060742

upgpkg: python-yara 4.1.0-3: Python 3.10 rebuild

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-12-01 21:31:29 UTC (rev 1060741)
+++ PKGBUILD2021-12-01 21:31:34 UTC (rev 1060742)
@@ -5,7 +5,7 @@
 pkgname=python-yara
 pkgver=4.1.0
 _gitcommit=dc838e211e45442d219012099aaa63efa812c4be
-pkgrel=2
+pkgrel=3
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')



[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2021-12-01 Thread Felix Yan via arch-commits
Date: Wednesday, December 1, 2021 @ 14:57:09
  Author: felixonmars
Revision: 1059586

upgpkg: python-yara 4.1.0-2: Python 3.10 rebuild

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-12-01 14:56:59 UTC (rev 1059585)
+++ PKGBUILD2021-12-01 14:57:09 UTC (rev 1059586)
@@ -5,7 +5,7 @@
 pkgname=python-yara
 pkgver=4.1.0
 _gitcommit=dc838e211e45442d219012099aaa63efa812c4be
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')



[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2021-06-08 Thread Kpcyrd via arch-commits
Date: Tuesday, June 8, 2021 @ 22:08:26
  Author: kpcyrd
Revision: 96

upgpkg: python-yara 4.1.0-1

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-06-08 21:31:34 UTC (rev 95)
+++ PKGBUILD2021-06-08 22:08:26 UTC (rev 96)
@@ -3,9 +3,9 @@
 
 _gitname=yara-python
 pkgname=python-yara
-pkgver=4.0.5
-_gitcommit=83c005eda9b3dbe08581515e8db570ad7dcfee18
-pkgrel=2
+pkgver=4.1.0
+_gitcommit=dc838e211e45442d219012099aaa63efa812c4be
+pkgrel=1
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')


[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2021-03-27 Thread Levente Polyak via arch-commits
Date: Sunday, March 28, 2021 @ 00:14:55
  Author: anthraxx
Revision: 905851

upgpkg: python-yara 4.0.5-2

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |   57 ++---
 1 file changed, 14 insertions(+), 43 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-03-28 00:09:21 UTC (rev 905850)
+++ PKGBUILD2021-03-28 00:14:55 UTC (rev 905851)
@@ -2,70 +2,41 @@
 # Contributor: arch3y 
 
 _gitname=yara-python
-pkgbase=python-yara
-pkgname=('python-yara' 'python2-yara')
+pkgname=python-yara
 pkgver=4.0.5
 _gitcommit=83c005eda9b3dbe08581515e8db570ad7dcfee18
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')
 license=('Apache')
-makedepends=('git' 'yara' 'glibc'
- 'python' 'python-setuptools'
- 'python2' 'python2-setuptools')
-source=(${pkgbase}::git+"https://github.com/VirusTotal/${_gitname}#commit=${_gitcommit};)
+depends=('python' 'yara' 'libyara.so' 'glibc')
+makedepends=('git' 'python-setuptools')
+source=(${pkgname}::git+"https://github.com/VirusTotal/${_gitname}#commit=${_gitcommit};)
 sha512sums=('SKIP')
 
 pkgver() {
-  cd ${pkgbase}
+  cd ${pkgname}
   git describe --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
 }
 
-prepare() {
-  cp -a ${pkgbase}{,-py2}
-}
-
 build() {
-  echo 'Building python...'
-  (cd ${pkgbase}
-python setup.py build --dynamic-linking
-  )
-  echo 'Building python2...'
-  (cd ${pkgbase}-py2
-python2 setup.py build --dynamic-linking
-  )
+  cd ${pkgname}
+  python setup.py build --dynamic-linking
 }
 
 check() {
-  echo 'Checking python...'
-  (cd ${pkgbase}
-local PYTHONVERSION="$(python -c 'import sys; 
print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
-PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
-  python tests.py
-  )
-  echo 'Checking python2...'
-  (cd ${pkgbase}-py2
-local PYTHONVERSION="$(python2 -c 'import sys; 
print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
-PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
-  python2 tests.py
-  )
+  cd ${pkgname}
+  local PYTHONVERSION="$(python -c 'import sys; 
print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+  PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+python tests.py
 }
 
-package_python-yara() {
-  depends=('python' 'yara' 'libyara.so' 'glibc')
-  cd ${pkgbase}
+package() {
+  cd ${pkgname}
   python setup.py install --root="${pkgdir}" -O1 --skip-build
   install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
   ln -s /usr/share/doc/yara/docs "${pkgdir}/usr/share/doc/${pkgname}/docs"
 }
 
-package_python2-yara() {
-  depends=('python2' 'yara' 'libyara.so' 'glibc')
-  cd ${pkgbase}-py2
-  python2 setup.py install --root="${pkgdir}" -O1 --skip-build
-  install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
-  ln -s /usr/share/doc/yara/docs "${pkgdir}/usr/share/doc/${pkgname}/docs"
-}
-
 # vim: ts=2 sw=2 et:


[arch-commits] Commit in python-yara/trunk (PKGBUILD)

2021-03-09 Thread Levente Polyak via arch-commits
Date: Tuesday, March 9, 2021 @ 20:46:56
  Author: anthraxx
Revision: 887149

upgpkg: python-yara 4.0.5-1

Modified:
  python-yara/trunk/PKGBUILD

--+
 PKGBUILD |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2021-03-09 20:45:18 UTC (rev 887148)
+++ PKGBUILD2021-03-09 20:46:56 UTC (rev 887149)
@@ -4,9 +4,9 @@
 _gitname=yara-python
 pkgbase=python-yara
 pkgname=('python-yara' 'python2-yara')
-pkgver=4.0.2
-_gitcommit=a1ed3cb54e8361a24e185183fccd888d99b15ae5
-pkgrel=2
+pkgver=4.0.5
+_gitcommit=83c005eda9b3dbe08581515e8db570ad7dcfee18
+pkgrel=1
 pkgdesc='Tool aimed at helping malware researchers to identify and classify 
malware samples'
 url='https://github.com/VirusTotal/yara-python'
 arch=('x86_64')