diff --git a/.gitignore b/.gitignore index e06eb1a8ed003e0eace7990796b6648cff4b62af..1973bb19c120e21f6794e2ccc8b22f32adcec53e 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 41fc7eec093b08efe5e745b7d6fc430ff9048228..8ca6981746c2bd0bb8ac20c37633e2ec05a7ea4b 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 44408fd94749ba424dd645ccb98bc2dafeb29644..3e787f6718bd182ee659b6469153b35ebe2fcdee 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 2e0723c88cb07f6add3992729a5835c6b4d8ce58..179384d8001162821c3c977880b0017b6edce208 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 f9dd3437af41a1313f5e5c49be541dc152c17dfe..39c4862ccd033ea5298ac1b785c3817e8b2162b7 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 b62f63a03c1d16c168ea734d361d833ab113fd50..424c20c1cddb25d9ad60b44870adc6518a7b2685 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,