Run python tests without make install
In order to do this, we need to add some stub gi module init files which allow us to extend the gi overrides path.
This commit is contained in:
parent
c5a4afbe40
commit
8b598d5b77
@ -772,8 +772,6 @@ fi
|
||||
|
||||
if test x"$enable_pyvips8" = x"yes"; then
|
||||
PKG_CHECK_MODULES(PYGOBJECT, [pygobject-3.0 >= 3.12.0])
|
||||
pyoverridesdir="\$(pyexecdir)/gi/overrides"
|
||||
AC_SUBST(pyoverridesdir)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_PYVIPS8, test x"$enable_pyvips8" = x"yes")
|
||||
@ -994,6 +992,9 @@ AC_OUTPUT([
|
||||
tools/light_correct
|
||||
tools/shrink_width
|
||||
python/Makefile
|
||||
python/packages/Makefile
|
||||
python/packages/gi/Makefile
|
||||
python/packages/gi/overrides/Makefile
|
||||
test/Makefile
|
||||
test/variables.sh
|
||||
swig/Makefile
|
||||
|
@ -1,17 +1,5 @@
|
||||
vips_overridesdir = $(pyoverridesdir)
|
||||
vips_overrides_PYTHON = Vips.py
|
||||
SUBDIRS = packages
|
||||
|
||||
EXTRA_DIST = \
|
||||
README.md
|
||||
|
||||
# if we build in a separate tree, we need to symlink the *.py files from the
|
||||
# source tree; Python does not accept the extensions and modules in different
|
||||
# paths
|
||||
build_pylinks:
|
||||
for f in $(vips_overrides_PYTHON); do \
|
||||
[ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
|
||||
done
|
||||
|
||||
all-local: build_pylinks
|
||||
check-local: build_pylinks
|
||||
|
||||
|
1
python/packages/Makefile.am
Normal file
1
python/packages/Makefile.am
Normal file
@ -0,0 +1 @@
|
||||
SUBDIRS = gi
|
5
python/packages/gi/Makefile.am
Normal file
5
python/packages/gi/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
SUBDIRS = overrides
|
||||
|
||||
EXTRA_DIST = \
|
||||
__init__.py
|
||||
|
3
python/packages/gi/__init__.py
Normal file
3
python/packages/gi/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# support overrides in different directories than our gi module
|
||||
from pkgutil import extend_path
|
||||
__path__ = extend_path(__path__, __name__)
|
5
python/packages/gi/overrides/Makefile.am
Normal file
5
python/packages/gi/overrides/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
vips_overridesdir = $(pyexecdir)/gi/overrides
|
||||
vips_overrides_PYTHON = Vips.py
|
||||
|
||||
EXTRA_DIST = \
|
||||
__init__.py
|
3
python/packages/gi/overrides/__init__.py
Normal file
3
python/packages/gi/overrides/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# support overrides in different directories than our gi module
|
||||
from pkgutil import extend_path
|
||||
__path__ = extend_path(__path__, __name__)
|
@ -1,4 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.append('../python/packages')
|
||||
|
||||
import unittest
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user