[arch-commits] Commit in python-pyroute2/repos (3 files)

Thore Bödecker foxxx0 at gemini.archlinux.org
Wed Mar 30 15:42:00 UTC 2022


    Date: Wednesday, March 30, 2022 @ 15:42:00
  Author: foxxx0
Revision: 1177803

archrelease: copy trunk to community-testing-any

Added:
  python-pyroute2/repos/community-testing-any/
  python-pyroute2/repos/community-testing-any/PKGBUILD
    (from rev 1177802, python-pyroute2/trunk/PKGBUILD)
  python-pyroute2/repos/community-testing-any/fix_makefile.patch
    (from rev 1177802, python-pyroute2/trunk/fix_makefile.patch)

--------------------+
 PKGBUILD           |   51 ++++++++++++++++++++++++++++++++++++++++++++
 fix_makefile.patch |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)

Copied: python-pyroute2/repos/community-testing-any/PKGBUILD (from rev 1177802, python-pyroute2/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2022-03-30 15:42:00 UTC (rev 1177803)
@@ -0,0 +1,51 @@
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: brent s. <bts[at]square-r00t[dot]net>
+# Contributor: Alexander Phinikarides <alexisph _AT_ gmail _DOT_ com>
+
+pkgbase='python-pyroute2'
+_pkgbase="${pkgbase//python-/}"
+pkgname=("python-${_pkgbase}")
+pkgdesc="A pure Python netlink and Linux network configuration library"
+pkgver=0.6.9
+pkgrel=1
+arch=('any')
+url="https://docs.pyroute2.org/"
+license=('GPL2' 'Apache')
+depends=('python')
+makedepends=('python' 'python-pip' 'python-setuptools' 'python-setuptools-scm' 'python-sphinx' 'git' 'python-aafigure' 'twine' 'python-black')
+checkdepends=('python-pytest')
+source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz"
+        'fix_makefile.patch')
+sha512sums=('4de8b8dc897959e2dc367dec460a918ace6cc096c2f634433b39d1600bafa4ca6841f54280d581f6331bf2b9776cac75e721afa2bbabbd329cc0a12b34e91fe8'
+            '05742f086de35b382aa97ac5e0bce0fd5bb2454f85d60c230a474700859af33806f45001ff7a072b71995494d747333a7f22761f5859bbf06fef59ccd81f86a9')
+
+prepare() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+
+  # Update the version manually. Otherwise it would look for a git tag which is not present in the distribution.
+  sed -i "s/version = get_project_version.*$/version = '${pkgver}'/" util/update_version.py
+  sed -i "s/^VERSION=.*\$/VERSION='${pkgver}'/" tests/conf.sh
+
+  # there is some weirdness in the Makefile with respect to depencies
+  # TODO : this needs to be submitted upstream
+  patch -p1 -N -i "${srcdir}/fix_makefile.patch"
+
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  make dist
+}
+
+check() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  # upstream tests are not meant to be executed downstream
+  :
+}
+
+package() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  make root="${pkgdir}/" install
+}
+
+# vim:set ts=2 sw=2 et:

Copied: python-pyroute2/repos/community-testing-any/fix_makefile.patch (from rev 1177802, python-pyroute2/trunk/fix_makefile.patch)
===================================================================
--- community-testing-any/fix_makefile.patch	                        (rev 0)
+++ community-testing-any/fix_makefile.patch	2022-03-30 15:42:00 UTC (rev 1177803)
@@ -0,0 +1,58 @@
+Only in a: dist
+diff -upr a/Makefile b/Makefile
+--- a/Makefile	2022-03-21 09:45:51.000000000 +0100
++++ b/Makefile	2022-03-30 16:15:10.079243904 +0200
+@@ -44,7 +44,7 @@ ifdef lib
+ endif
+
+ define list_modules
+-	`ls -1 | sed -n '/egg-info/n; /pyroute2/p'`
++	`find . -maxdepth 1 -mindepth 1 -type d -iname 'pyroute2*' -printf '%f\n'`
+ endef
+
+ define make_modules
+@@ -57,7 +57,7 @@ endef
+
+ define clean_module
+ 	if [ -f $$module/setup.json ]; then \
+-		for i in `ls -1 templates`; do rm -f $$module/$$i; done; \
++		for i in `find templates -maxdepth 1 -mindepth 1 -type f -printf '%f\n'`; do rm -f $$module/$$i; done; \
+ 	fi; \
+ 	rm -f $$module/LICENSE.*; \
+ 	rm -f $$module/README.license.md; \
+@@ -71,7 +71,7 @@ endef
+ define process_templates
+ 	for module in $(call list_modules); do \
+ 		if [ -f $$module/setup.json ]; then \
+-			for template in `ls -1 templates`; do \
++			for template in `find templates -maxdepth 1 -mindepth 1 -type f -printf '%f\n'`; do \
+ 				${python} \
+ 					util/process_template.py \
+ 					templates/$$template \
+@@ -207,6 +207,8 @@ upload: dist
+ 	${python} -m twine upload dist/*
+
+ setup:
++	$(MAKE) clean
++	$(MAKE) VERSION
+ 	$(call process_templates)
+ 	@for module in $(call list_modules); do $(call deploy_license); done
+ 	@for module in pyroute2 pyroute2.minimal; do \
+@@ -217,7 +219,7 @@ setup:
+ 			$$module/setup.cfg ; \
+ 	done
+
+-dist: clean VERSION setup
++dist: setup
+ 	cd pyroute2; ${python} setup.py sdist
+ 	mkdir dist
+ 	$(call make_modules, dist)
+@@ -231,7 +233,7 @@ install: dist
+ install-minimal: dist
+ 	${python} -m pip install dist/pyroute2.minimal* dist/pyroute2.core* ${root}
+
+-uninstall: clean VERSION setup
++uninstall: setup
+ 	$(call make_modules, uninstall)
+
+ audit-imports:



More information about the arch-commits mailing list