diff --git a/pyvips/__init__.py b/pyvips/__init__.py
index <HASH>..<HASH> 100644
--- a/pyvips/__init__.py
+++ b/pyvips/__init__.py
@@ -88,7 +88,7 @@ if vips_lib.vips_init(sys.argv[0].encode()) != 0:
 logger.debug('Inited libvips')
 
 if not API_mode:
-    from pyvips import vdecls
+    from .vdecls import cdefs
 
     major = vips_lib.vips_version(0)
     minor = vips_lib.vips_version(1)
@@ -100,7 +100,7 @@ if not API_mode:
         'api': False,
     }
 
-    ffi.cdef(vdecls.cdefs(features))
+    ffi.cdef(cdefs(features))
 
 from .error import *
 
diff --git a/pyvips/pyvips_build.py b/pyvips/pyvips_build.py
index <HASH>..<HASH> 100644
--- a/pyvips/pyvips_build.py
+++ b/pyvips/pyvips_build.py
@@ -38,7 +38,7 @@ features = {
     'api': True,
 }
 
-from pyvips import vdecls
+import vdecls
 
 # handy for debugging
 #with open('vips-source.txt','w') as f:
don't try to import vdecls via pyvips

perhaps this will fix Travis