-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use native meson python module for python install.
Signed-off-by: James Hilliard <[email protected]>
- Loading branch information
1 parent
543308d
commit 05912e9
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
subdir('c') | ||
subdir('python') | ||
if not get_option('enable-python').disabled() | ||
subdir('python') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
run_command('pip3', 'install', '.') | ||
pymod = import('python') | ||
python = pymod.find_installation( | ||
get_option('with-python-version'), | ||
required : get_option('enable-python').enabled(), | ||
disabler : true | ||
) | ||
|
||
pythonver = python.language_version() | ||
if pythonver.version_compare('<3.5') | ||
error('Python @0@ is not supported anymore, please port your code to python3.5 or newer.'.format(python.language_version())) | ||
endif | ||
|
||
pygstc_src_files = [ | ||
'pygstc/__init__.py', | ||
'pygstc/gstc.py', | ||
'pygstc/gstcerror.py', | ||
'pygstc/logger.py', | ||
'pygstc/tcp.py' | ||
] | ||
|
||
python.install_sources( | ||
pygstc_src_files, | ||
subdir : 'pygstc', | ||
pure : true | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters