File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 22import os , sys
33myPath = os .path .dirname (os .path .abspath (__file__ ))
44
5- # Add path to location of the python APR module (your build folder)
6- #sys.path.insert(0, "../cmake-build-release")
5+ # The test is run from the build folder, which is where the pyApr module is located
6+ sys .path .insert (0 , os .getcwd ())
7+ import pyApr
78
89# Check if APR can be read and if gives correct dimensions
910#import pyApr
1011import numpy as np
11- import fnmatch
1212
1313
1414def main ():
15- """
16- If you get ImportErrors, or if you have more than one build containing a file pyApr.so, you may want to
17- manually supply the path by changing the block below to
18- sys.path.insert(0, '/path/to/dir/containing/module/')
19- """
20- # -------------------------------------------------- #
21- print ("Searching for pyApr module..." )
22- basePath = os .path .join (myPath , os .pardir )
23- for root , dirnames , filenames in os .walk (basePath ):
24- if fnmatch .filter (filenames , 'pyApr.so' ):
25- sys .path .insert (0 , root )
26- print ('pyApr module found in {}' .format (root ))
27- # -------------------------------------------------- #
28-
29- import pyApr
3015
3116 successes = 0
3217
You can’t perform that action at this time.
0 commit comments