diff --git a/example/example3/example3/example3/__init__.py b/example/example3/example3/example3/__init__.py index fa84e47ee529b348bfcf12c1c64433e3c127dde4..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 --- a/example/example3/example3/example3/__init__.py +++ b/example/example3/example3/example3/__init__.py @@ -1,5 +1 @@ -import logging -import typing as tp - -logger = logging.getLogger(__name__) diff --git a/example/setup.py b/example/setup.py index f209796191579ef0aa1dcaeb124fb1643409215e..ed97887bc80563fe57b5ab9e656893379f055a4a 100644 --- a/example/setup.py +++ b/example/setup.py @@ -9,6 +9,7 @@ monkey_patch_parallel_compilation() dont_snakehouse = False if 'DEBUG' in os.environ: + print('Debug is enabled!') dont_snakehouse = True diff --git a/snakehouse/__init__.py b/snakehouse/__init__.py index d5071426b7fa70055f26afaa8cdab2abd62698a5..88d6fbf4ab6430674a5146f0ece267aea1e03087 100644 --- a/snakehouse/__init__.py +++ b/snakehouse/__init__.py @@ -2,4 +2,4 @@ from .build import build from .multibuild import Multibuild from .faster_builds import monkey_patch_parallel_compilation -__version__ = '1.3a1' +__version__ = '1.3a2' diff --git a/snakehouse/multibuild.py b/snakehouse/multibuild.py index 43b172313d5d9818c7bd6fe28b2865be236832ef..50544a7da7f739a67d28708ceef7c8bf9da9b812 100644 --- a/snakehouse/multibuild.py +++ b/snakehouse/multibuild.py @@ -56,7 +56,8 @@ class Multibuild: as a separate extension. It is for these cases when you're testing and something segfaults. """ def __init__(self, extension_name: str, files: tp.Iterator[str], - dont_snakehouse: bool = False, **kwargs): + dont_snakehouse: bool = False, + **kwargs): # sanitize path separators so that Linux-style paths are supported on Windows files = list(files) self.dont_snakehouse = dont_snakehouse @@ -66,8 +67,10 @@ class Multibuild: self.files = list([file for file in files if not file.endswith('__bootstrap__.pyx')]) logger.warning(str(self.files)) self.pyx_files = [file for file in self.files if file.endswith('.pyx')] + self.c_files = [file for file in self.files if file.endswith('.c') or file.endswith('.cpp')] else: self.pyx_files = [] + self.c_files = [] self.do_generate = True if not self.pyx_files: @@ -204,9 +207,9 @@ class Multibuild: extensions = [] len_to_sub = len(self.bootstrap_directory) + len(os.path.pathsep) for pyx_file in self.pyx_files: - file_name = pyx_file[len_to_sub:-4].replace(os.pathsep, '.') - ext = Extension(file_name, - [pyx_file], *args, **kwargs) + file_name = pyx_file[len_to_sub:-4].replace('\\', '.').replace('/', '.') + ext = Extension(self.extension_name+'.'+file_name, + [pyx_file] + self.c_files, *args, **kwargs) extensions.append(ext) return extensions else: