From 7c61a22ff649764484ada5a70592bd551cedee9c Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Mon, 22 Jun 2020 23:45:50 -0500 Subject: [PATCH 1/3] Require Py3.6 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 5d7ec91..117411d 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ setup(name="codepy", license="MIT", packages=["codepy", "codepy.cgen"], + python_requires="~=3.6", install_requires=[ "pytools>=2015.1.2", "numpy>=1.6", -- GitLab From 4f2a9d860eae62d9b1dac21ab310c1ff16ed9e5f Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Mon, 22 Jun 2020 23:45:50 -0500 Subject: [PATCH 2/3] Add .editorconfig --- .editorconfig | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..817e87a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +# https://editorconfig.org/ +# https://github.com/editorconfig/editorconfig-vim +# https://github.com/editorconfig/editorconfig-emacs + +root = true + +[*] +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.py] +indent_size = 4 + +[*.rst] +indent_size = 4 + +[*.cpp] +indent_size = 2 + +[*.hpp] +indent_size = 2 + +# There may be one in doc/ +[Makefile] +indent_style = tab + +# https://github.com/microsoft/vscode/issues/1679 +[*.md] +trim_trailing_whitespace = false \ No newline at end of file -- GitLab From 50ea027fc67b0a34bdabfea1fd8825180147dc8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Tue, 23 Jun 2020 07:17:43 +0200 Subject: [PATCH 3/3] Placate flake8 --- codepy/toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codepy/toolchain.py b/codepy/toolchain.py index 7378dcc..004c0e6 100644 --- a/codepy/toolchain.py +++ b/codepy/toolchain.py @@ -272,8 +272,8 @@ class GCCToolchain(GCCLikeToolchain): return Toolchain.abi_id(self) + [self._cmdline([])] def with_optimization_level(self, level, debug=False, **extra): - def remove_prefix(l, prefix): - return [f for f in l if not f.startswith(prefix)] + def remove_prefix(line, prefix): + return [f for f in line if not f.startswith(prefix)] cflags = self.cflags for pfx in ["-O", "-g", "-march", "-mtune", "-DNDEBUG"]: -- GitLab