Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
3b1ad192
Commit
3b1ad192
authored
Aug 24, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix a test under MacOS.
parent
1a6b81d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
tests/run/scanner_trace.srctree
tests/run/scanner_trace.srctree
+18
-8
No files found.
tests/run/scanner_trace.srctree
View file @
3b1ad192
...
...
@@ -9,16 +9,26 @@ import Cython.Compiler.Scanning
Cython.Compiler.Scanning.trace_scanner = 1
setup(
ext_modules = cythonize("*.pyx")
)
setup(ext_modules=cythonize("*.pyx"))
try:
from importlib.util import spec_from_file_location, module_from_spec
except ImportError:
# Py<=3.4
# Try to import from the current directory.
import os, sys
sys.path.insert(0, os.getcwd())
import simple
else:
# Py3.5+
import glob
ext_files = glob.glob("simple*.so") + glob.glob("simple*.pyd")
assert ext_files
spec = spec_from_file_location('simple', ext_files[0])
simple = module_from_spec(spec)
spec.loader.exec_module(simple)
# Make sure we can import from the current directory.
import os
import sys
sys.path.insert(0, os.getcwd())
import simple
assert simple.test() == 123
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment