Skip to content

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

Merged
merged 11 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/_libs/reshape.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ np.import_array()

from numpy cimport (ndarray,
int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t,
uint32_t, uint64_t, float16_t, float32_t, float64_t)
uint32_t, uint64_t, float32_t, float64_t)

cdef double NaN = <double> np.NaN
cdef double nan = NaN
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/sparse.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from numpy cimport (ndarray, uint8_t, int64_t, int32_t, int16_t, int8_t,
float64_t, float32_t, float16_t)
float64_t, float32_t)
cimport numpy as np

cimport cython
Expand Down
25 changes: 18 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@ def pxd(name):
return os.path.abspath(pjoin('pandas', name + '.pxd'))


if _have_setuptools:
Copy link
Contributor

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.

# 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 = []
Expand Down Expand Up @@ -503,7 +510,8 @@ def pxd(name):
'depends': _pxi_dep['index'],
'sources': np_datetime_sources},
'_libs.indexing': {
'pyxfile': '_libs/indexing'},
'pyxfile': '_libs/indexing',
'include': []},
'_libs.interval': {
'pyxfile': '_libs/interval',
'pxdfiles': ['_libs/hashtable'],
Expand Down Expand Up @@ -536,10 +544,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',
Expand Down Expand Up @@ -579,8 +589,7 @@ def pxd(name):
'_libs/tslibs/frequencies']},
'_libs.tslibs.parsing': {
'pyxfile': '_libs/tslibs/parsing',
'pxdfiles': ['_libs/src/util',
Copy link
Contributor

Choose a reason for hiding this comment

The 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).

Copy link
Member Author

Choose a reason for hiding this comment

The 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.resolution': {
'pyxfile': '_libs/tslibs/resolution',
'pxdfiles': ['_libs/src/util',
Expand All @@ -604,14 +613,16 @@ def pxd(name):
'pyxfile': '_libs/tslibs/timezones',
'pxdfiles': ['_libs/src/util']},
'_libs.testing': {
'pyxfile': '_libs/testing'},
'pyxfile': '_libs/testing',
'include': []},
'_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 = []

Expand Down