-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
explicitly set 'include' to numpy_incls #18112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
b81e094
e944e7c
37ad0f2
d00a814
710aa94
4b1332a
7252bdd
2467cb4
719a457
c7ffb02
0274152
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -460,6 +460,13 @@ def pxd(name): | |
return os.path.abspath(pjoin('pandas', name + '.pxd')) | ||
|
||
|
||
if _have_setuptools: | ||
# Note: this is a list, whereas `numpy_incl` in build_ext.build_extensions | ||
# is a string | ||
numpy_incls = [pkg_resources.resource_filename('numpy', 'core/include')] | ||
else: | ||
numpy_incls = [] | ||
|
||
# args to ignore warnings | ||
if is_platform_windows(): | ||
extra_compile_args = [] | ||
|
@@ -499,10 +506,10 @@ def pxd(name): | |
'_libs.index': { | ||
'pyxfile': '_libs/index', | ||
'pxdfiles': ['_libs/src/util', '_libs/hashtable'], | ||
'depends': _pxi_dep['index'], | ||
'sources': np_datetime_sources}, | ||
'depends': _pxi_dep['index']}, | ||
'_libs.indexing': { | ||
'pyxfile': '_libs/indexing'}, | ||
'pyxfile': '_libs/indexing', | ||
'include': []}, | ||
'_libs.interval': { | ||
'pyxfile': '_libs/interval', | ||
'pxdfiles': ['_libs/hashtable'], | ||
|
@@ -535,10 +542,12 @@ def pxd(name): | |
'include': []}, | ||
'_libs.reshape': { | ||
'pyxfile': '_libs/reshape', | ||
'depends': _pxi_dep['reshape']}, | ||
'depends': _pxi_dep['reshape'], | ||
'include': numpy_incls}, | ||
'_libs.sparse': { | ||
'pyxfile': '_libs/sparse', | ||
'depends': _pxi_dep['sparse']}, | ||
'depends': _pxi_dep['sparse'], | ||
'include': numpy_incls}, | ||
'_libs.tslib': { | ||
'pyxfile': '_libs/tslib', | ||
'pxdfiles': ['_libs/src/util', | ||
|
@@ -578,14 +587,12 @@ def pxd(name): | |
'_libs/tslibs/frequencies']}, | ||
'_libs.tslibs.parsing': { | ||
'pyxfile': '_libs/tslibs/parsing', | ||
'pxdfiles': ['_libs/src/util', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls don’t change this; if u look in the source these depend on these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we looking at different source files? tslibs.parsing doesn't cimport from util or khash. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. side note, should parsing depend on nattype? (then for example nat strings are in 1 place). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well nat_strings is defined but not c-defined in nattype, so we could import it into parsing without needing to specify the dependency. I'd be fine with that, or with having it defined one extra place. parsing has no intra-pandas dependencies at the moment (neither import nor cimport) which makes it really low-stress. |
||
'_libs/src/khash']}, | ||
'include': numpy_incls}, | ||
'_libs.tslibs.strptime': { | ||
'pyxfile': '_libs/tslibs/strptime', | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/tslibs/nattype'], | ||
'depends': tseries_depends, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tseries_depends already incldes np_datetime, so no need to add this explicty. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think this one needs to change back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the diff it isn't clear which file you're referring to. Best guess is tslibs.strptime? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for tslibs.strptime, still needs to have tseries_depends, np? (e.g. np_datetime is there) |
||
'sources': np_datetime_sources}, | ||
'_libs/tslibs/nattype', | ||
'_libs/tslibs/np_datetime']}, | ||
'_libs.tslibs.timedeltas': { | ||
'pyxfile': '_libs/tslibs/timedeltas', | ||
'pxdfiles': ['_libs/src/util', | ||
|
@@ -596,14 +603,16 @@ def pxd(name): | |
'pyxfile': '_libs/tslibs/timezones', | ||
'pxdfiles': ['_libs/src/util']}, | ||
'_libs.testing': { | ||
'pyxfile': '_libs/testing'}, | ||
'pyxfile': '_libs/testing', | ||
'include': []}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the difference betwee not passing include and an empty list? (from a compilation perspective)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can be removed IINM. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the 'include' key, it gets set to a default of |
||
'_libs.window': { | ||
'pyxfile': '_libs/window', | ||
'pxdfiles': ['_libs/src/skiplist', '_libs/src/util'], | ||
'depends': ['pandas/_libs/src/skiplist.pyx', | ||
'pandas/_libs/src/skiplist.h']}, | ||
'io.sas._sas': { | ||
'pyxfile': 'io/sas/sas'}} | ||
'pyxfile': 'io/sas/sas', | ||
'include': numpy_incls}} | ||
|
||
extensions = [] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this whole setuptools optional biz is a mess. we should just require it (and we do in our recipes, so this is all old code). note nothing to do with this PR.