void-packages/srcpkgs/python3-pyside2/patches/tests-find-python-modules-from-build.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
954 B
Diff

tests need python modules that are not installed yet: point the built ones.
Reported upstream: https://bugreports.qt.io/browse/PYSIDE-1430
--- a/sources/pyside2/tests/init_paths.py 2020-11-11 13:51:30.000000000 +0100
+++ b/sources/pyside2/tests/init_paths.py 2020-11-21 23:36:33.131282473 +0100
@@ -75,12 +75,12 @@
python_dirs = [os.path.join(src_dir, 'util')] # Helper module
- pyside_build_dir = os.path.join(get_build_dir(), 'pyside2')
- python_dirs.append(pyside_build_dir) # for PySide2
+ pyside_build_dir = os.path.join(get_build_dir(), 'PySide2')
+ python_dirs.append(get_build_dir()) # for PySide2
lib_dirs = [os.path.join(pyside_build_dir, 'libpyside')]
if testbindings_module:
- python_dirs.append(os.path.join(pyside_build_dir,
+ python_dirs.append(os.path.join(get_build_dir(),
'tests', 'pysidetest'))
lib_dirs.append(_get_qt_lib_dir())