Skip to content
Snippets Groups Projects
Commit f4683e04 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

3.6 and 3.7 inexplicably hang

parent 31495817
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,6 @@ jobs:
include:
- stage: test
python: "3.5"
- stage: test
python: "3.6"
- stage: test
python: "3.7"
- stage: test
python: "3.8"
- stage: test
......
......@@ -4,7 +4,7 @@
* `snakehouse` doesn't need cython and satella installed in advance
* added `find_all`
* made available for PyPy users
* deprecated `find_pyx` and `find_pyx_and_c`
* deprecated `find_pyx`, `find_c` and `find_pyx_and_c`
# v1.4
......
......@@ -50,19 +50,26 @@ class find_all:
A directive for :class:`snakehouse.Multibuild` to locate all .pyx
files, and possibly all the .c files depending on the switch
:param dir: base directory to look for files in
:param include_c_files: whether to also hook up the located .c files
:param directory: base directory to look for files in
:param include_c_files: whether to also hook up the located .c files (default False)
:param only_c_files: whether to look up only .c files (default False)
"""
def __init__(self, dir: str, include_c_files: bool = False):
self.dir = dir
def __init__(self, directory: str, include_c_files: bool = False,
only_c_files: bool = False):
self.dir = directory
self.include_c_files = include_c_files
self.only_c_files = only_c_files
def __iter__(self):
pyx_files = find_files(self.dir, r'(.*)\.pyx', scan_subdirectories=True)
c_files = find_files(self.dir, r'(.*)\.c', scan_subdirectories=True)
if self.only_c_files:
pyx_files = []
else:
pyx_files = find_files(self.dir, r'(.*)\.pyx', scan_subdirectories=True)
if self.include_c_files:
pyx_files = itertools.chain(pyx_files, c_files)
pyx_files = itertools.chain(pyx_files,
find_files(self.dir, r'(.*)\.c', scan_subdirectories=True))
return pyx_files
......
......@@ -25,6 +25,7 @@ def find_c(directory_path: str) -> tp.List[str]:
:param directory_path: directory to look through
:return: .c files found
"""
warnings.warn('This is deprecated. Use find_all instead', DeprecationWarning)
return find_files(directory_path, '(.*)\\.c$', scan_subdirectories=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment