-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EXPERIMENT: play with cython's dependency resolution
Patching up Cython.Build via the included cython.patch, then running `python setup.py build_ext -i`, and walking the stack in pdb, can get: (Pdb) p deps.cimported_files('observable.pyx') ('observable.pxd',) (Pdb) p deps.included_files('observable.pyx') {'foobar.pxi'} So that should be enough to cook up a depfile for `observable.pyx` from this?
- Loading branch information
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$ git diff | ||
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py | ||
index ae491c7c6..9f863b2b7 100644 | ||
--- a/Cython/Build/Dependencies.py | ||
+++ b/Cython/Build/Dependencies.py | ||
@@ -990,6 +990,8 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, | ||
deps = create_dependency_tree(ctx, quiet=quiet) | ||
build_dir = getattr(options, 'build_dir', None) | ||
|
||
+ import pdb; pdb.set_trace() | ||
+ | ||
def copy_to_build_dir(filepath, root=os.getcwd()): | ||
filepath_abs = os.path.abspath(filepath) | ||
if os.path.isabs(filepath): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
def foo(): | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from setuptools import setup | ||
from Cython.Build import cythonize | ||
|
||
setup( | ||
ext_modules = cythonize("observable.pyx") | ||
) |