Skip to content

Commit

Permalink
tests: take into account Debian Python paths
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Sep 22, 2021
1 parent 18aaf59 commit 40c058a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test cases/python/1 basic/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ if py_version.version_compare('< 3.2')
endif

py_purelib = py.get_path('purelib')
if not py_purelib.endswith('site-packages')
if not py_purelib.endswith('site-packages') or not py_purelib.endswith('dist-packages')
error('Python3 purelib path seems invalid? ' + py_purelib)
endif
message('Python purelib path:', py_purelib)

# could be 'lib64' or 'Lib' on some systems
py_platlib = py.get_path('platlib')
if not py_platlib.endswith('site-packages')
if not py_platlib.endswith('site-packages') or not py_platlib.endswith('dist-packages')
error('Python3 platlib path seems invalid? ' + py_platlib)
endif

Expand Down
4 changes: 2 additions & 2 deletions test cases/python3/1 basic/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ if py3_version.version_compare('< 3.2')
endif

py3_purelib = py3_mod.sysconfig_path('purelib')
if not py3_purelib.to_lower().startswith('lib') or not py3_purelib.endswith('site-packages')
if not py3_purelib.to_lower().startswith('lib') or not py3_purelib.endswith('site-packages') or not py3_purelib.endswith('dist-packages')
error('Python3 purelib path seems invalid?')
endif

# could be 'lib64' or 'Lib' on some systems
py3_platlib = py3_mod.sysconfig_path('platlib')
if not py3_platlib.to_lower().startswith('lib') or not py3_platlib.endswith('site-packages')
if not py3_platlib.to_lower().startswith('lib') or not py3_platlib.endswith('site-packages') or not py3_platlib.endswith('dist-packages')
error('Python3 platlib path seems invalid?')
endif

Expand Down

0 comments on commit 40c058a

Please sign in to comment.