From 5d89fc7a9b5653a942ffd1a824307fc33fd01625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Fri, 27 Mar 2020 16:09:09 +0100 Subject: [PATCH] v1.1.1 --- .gitignore | 2 ++ CHANGELOG.md | 2 +- example/setup.py | 4 +++- requirements.txt | 1 + setup.py | 2 +- snakehouse/__init__.py | 2 +- snakehouse/multibuild.py | 3 +++ 7 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c03c37c..fab0803 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ build dist .eggs *.c +__bootstrap__.* + diff --git a/CHANGELOG.md b/CHANGELOG.md index 64be275..f396b2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # v1.1.1 -* _TBA_ +* allowed Linux-style paths on Windows build environments # v1.1 diff --git a/example/setup.py b/example/setup.py index 9b1ac8c..8e7ce40 100644 --- a/example/setup.py +++ b/example/setup.py @@ -6,7 +6,9 @@ from setuptools import Extension # note that you can include standard Extension classes in this list, those won't be touched # and will be directed directly to Cython.Build.cythonize() cython_multibuilds = [ - Multibuild('example_module', ['example_module/test.pyx', 'example_module/test2.pyx', + # note that Windows-style pathes are supported on Linux build environment, + # also, the reverse is true + Multibuild('example_module', ['example_module\\test.pyx', 'example_module/test2.pyx', 'example_module/test3/test3.pyx', 'example_module/test_n.c']), Extension('example2.example', ['example2/example.pyx']) diff --git a/requirements.txt b/requirements.txt index 8bf5286..e17969f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ Cython mako +satella diff --git a/setup.py b/setup.py index 3a0c073..5a0916f 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup(keywords=['cython', 'extension', 'multiple', 'pyx'], packages=find_packages(include=['snakehouse']), version=__version__, install_requires=[ - 'Cython', 'mako' + 'Cython', 'mako', 'satella', ], python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', package_data={ diff --git a/snakehouse/__init__.py b/snakehouse/__init__.py index 891acea..982a623 100644 --- a/snakehouse/__init__.py +++ b/snakehouse/__init__.py @@ -1,4 +1,4 @@ from .build import build from .multibuild import Multibuild -__version__ = '1.1.1_a1' \ No newline at end of file +__version__ = '1.1.1' diff --git a/snakehouse/multibuild.py b/snakehouse/multibuild.py index 48de6ba..c9d7bb9 100644 --- a/snakehouse/multibuild.py +++ b/snakehouse/multibuild.py @@ -1,6 +1,7 @@ import os import collections import pkg_resources +from satella.files import split from mako.template import Template from setuptools import Extension @@ -25,6 +26,8 @@ class Multibuild: :param extension_name: the module name :param files: list of pyx and c files """ + # sanitize path separators so that Linux-style paths are supported on Windows + files = [os.path.join(*split(file)) for file in files] self.files = list([file for file in files if not file.endswith('__bootstrap__.pyx')]) file_name_set = set(os.path.split(file)[1] for file in self.files) if len(self.files) != len(file_name_set): -- GitLab