From fe4e00d846743de9dfbe80d2ebfec4e6ba469ea2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com>
Date: Mon, 12 Aug 2024 21:51:22 +0200
Subject: [PATCH] fix tests

---
 .gitignore               | 1 +
 .gitlab-ci.yml           | 7 ++++++-
 CHANGELOG.md             | 6 ++++++
 example/setup.py         | 2 +-
 snakehouse/build.py      | 1 +
 snakehouse/multibuild.py | 5 +----
 6 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index e06eb1a..1973bb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ docs/_build
 dist
 .eggs
 *.c
+*.h
 __bootstrap__.*
 venv/
 .venv/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 41fc7ee..8ca6981 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,4 +18,9 @@ stages:
 
 test_python310:
   extends: .test
-  image: python:3.10
\ No newline at end of file
+  image: python:3.10
+
+
+test_python310:
+  extends: .test
+  image: python:3.11
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44408fd..3e787f6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v1.8
+
+* got rid of the Mako dependency
+* should work on latest Pythons
+* moved the development to SMOK's cloud
+
 # v1.7
 
 * should work on Windows now
diff --git a/example/setup.py b/example/setup.py
index 2e0723c..179384d 100644
--- a/example/setup.py
+++ b/example/setup.py
@@ -19,7 +19,7 @@ if 'DEBUG' in os.environ:
 cython_multibuilds = [
         # note that Windows-style pathes are supported on Linux build environment,
         # the reverse not necessarily being true (issue #5)
-    Multibuild('example_module', find_all('example_module', True),
+    Multibuild('example_module', find_all('example_module'),
                define_macros=[("CYTHON_TRACE_NOGIL", "1")],
                dont_snakehouse=dont_snakehouse),
     # Extension('example2.example', ['example2/example.pyx']),
diff --git a/snakehouse/build.py b/snakehouse/build.py
index f9dd343..39c4862 100644
--- a/snakehouse/build.py
+++ b/snakehouse/build.py
@@ -11,6 +11,7 @@ MultiBuildType = tp.Union[Multibuild, Exception]
 logger = logging.getLogger(__name__)
 
 
+
 def build(extensions: tp.List[MultiBuildType], *args, nthreads=None,
           debug: bool = False, **kwargs):
     """A call to build things. """
diff --git a/snakehouse/multibuild.py b/snakehouse/multibuild.py
index b62f63a..424c20c 100644
--- a/snakehouse/multibuild.py
+++ b/snakehouse/multibuild.py
@@ -122,7 +122,6 @@ class Multibuild:
                             raise BreakException
                     name = os.path.join(root, c_name)
                     if c_name == '__bootstrap__.c':
-                        print('Skipping %s' % (c_name, ))
                         continue
 
                     if not c_name.endswith('.c'):
@@ -150,7 +149,6 @@ class Multibuild:
             if os.path.exists(h_file):
                 with open(h_file, 'r', encoding='utf-8') as f_in:
                     data = f_in.readlines()
-                    print(f'writing {data} to {h_file}')
                 data = ['#include "Python.h"\n']
                 rendered_mako = HFILE_MAKO.format(initpy_name=coded_module_name)
 
@@ -248,7 +246,7 @@ class Multibuild:
         for root, dirs, files in os.walk('.'):
             for file in files:
                 c_name = os.path.join(root, file)
-                if c_name.startswith('__bootstrap__'):
+                if file.startswith('__bootstrap__'):
                     os.unlink(c_name)
 
     def write_bootstrap_file(self):
@@ -286,7 +284,6 @@ class Multibuild:
         else:
             kwargs.update(self.kwargs)
             for_cythonize = list(set([*self.files, os.path.join(self.bootstrap_directory, '__bootstrap__.pyx')]))
-            print(f'Rolling for cythonize {for_cythonize}')
             return [Extension(self.extension_name+".__bootstrap__",
                               for_cythonize,
                               *args,
-- 
GitLab