diff --git a/CHANGELOG.md b/CHANGELOG.md index 584230b9242c54265bbe871cfdcd718a23f93d3c..2336904382641de1d67806a440362f4a28bdb8c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## Version 1.1.2 +## Version 1.1.3 -* Move to gvec group \ No newline at end of file +* Add compile flag `--conda-warnings off` only if pyccel version is 1.8.0 or greater. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e97f59818aad6dff681bd25db3fda3319cbfb5e1..68564bd74615d616840a5b95201b66a07dc732b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gvec-to-python" -version = "1.1.2" +version = "1.1.3" readme = "README.md" requires-python = ">=3.7" license = {file = "LICENSE"} diff --git a/src/gvec_to_python/Makefile b/src/gvec_to_python/Makefile index da6bfb37061be289329f321e0783a5b0558e8066..29b50e12c3a5b31d0ba470bdf412f185f3392be5 100644 --- a/src/gvec_to_python/Makefile +++ b/src/gvec_to_python/Makefile @@ -5,7 +5,7 @@ PYTHON := python3 SO_EXT := $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") LIBDIR := $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") -FLAGS := --libdir $(LIBDIR) --conda-warnings off +FLAGS := --libdir $(LIBDIR) $(flags) #-------------------------------------- # SOURCE FILES diff --git a/src/gvec_to_python/console/compile.py b/src/gvec_to_python/console/compile.py index 6e56e5301b904d6a7e27dec3bb029785df8e5ff6..40a0f008ff8c35c74715dc8abb9b5401e6614021 100644 --- a/src/gvec_to_python/console/compile.py +++ b/src/gvec_to_python/console/compile.py @@ -3,13 +3,23 @@ def compile_gvec_to_python(): import subprocess import os import gvec_to_python + import pyccel libpath = gvec_to_python.__path__[0] + # pyccel flags + flags = '' + + _li = pyccel.__version__.split('.') + _num = int(_li[0])*100 + int(_li[1])*10 + int(_li[2]) + if _num >= 180: + flags += '--conda-warnings off' + print('\nCompiling gvec-to-python kernels ...') subprocess.run(['make', '-f', os.path.join(libpath, 'Makefile'), + 'flags=' + flags, 'install_path=' + libpath, ], check=True, cwd=libpath) print('Done.')