@@ -461,6 +461,13 @@ def pxd(name):
461
461
return os .path .abspath (pjoin ('pandas' , name + '.pxd' ))
462
462
463
463
464
+ if _have_setuptools :
465
+ # Note: this is a list, whereas `numpy_incl` in build_ext.build_extensions
466
+ # is a string
467
+ numpy_incls = [pkg_resources .resource_filename ('numpy' , 'core/include' )]
468
+ else :
469
+ numpy_incls = []
470
+
464
471
# args to ignore warnings
465
472
if is_platform_windows ():
466
473
extra_compile_args = []
@@ -503,7 +510,8 @@ def pxd(name):
503
510
'depends' : _pxi_dep ['index' ],
504
511
'sources' : np_datetime_sources },
505
512
'_libs.indexing' : {
506
- 'pyxfile' : '_libs/indexing' },
513
+ 'pyxfile' : '_libs/indexing' ,
514
+ 'include' : []},
507
515
'_libs.interval' : {
508
516
'pyxfile' : '_libs/interval' ,
509
517
'pxdfiles' : ['_libs/hashtable' ],
@@ -536,10 +544,12 @@ def pxd(name):
536
544
'include' : []},
537
545
'_libs.reshape' : {
538
546
'pyxfile' : '_libs/reshape' ,
539
- 'depends' : _pxi_dep ['reshape' ]},
547
+ 'depends' : _pxi_dep ['reshape' ],
548
+ 'include' : numpy_incls },
540
549
'_libs.sparse' : {
541
550
'pyxfile' : '_libs/sparse' ,
542
- 'depends' : _pxi_dep ['sparse' ]},
551
+ 'depends' : _pxi_dep ['sparse' ],
552
+ 'include' : numpy_incls },
543
553
'_libs.tslib' : {
544
554
'pyxfile' : '_libs/tslib' ,
545
555
'pxdfiles' : ['_libs/src/util' ,
@@ -580,8 +590,7 @@ def pxd(name):
580
590
'_libs/tslibs/frequencies' ]},
581
591
'_libs.tslibs.parsing' : {
582
592
'pyxfile' : '_libs/tslibs/parsing' ,
583
- 'pxdfiles' : ['_libs/src/util' ,
584
- '_libs/src/khash' ]},
593
+ 'include' : numpy_incls },
585
594
'_libs.tslibs.resolution' : {
586
595
'pyxfile' : '_libs/tslibs/resolution' ,
587
596
'pxdfiles' : ['_libs/src/util' ,
@@ -605,14 +614,16 @@ def pxd(name):
605
614
'pyxfile' : '_libs/tslibs/timezones' ,
606
615
'pxdfiles' : ['_libs/src/util' ]},
607
616
'_libs.testing' : {
608
- 'pyxfile' : '_libs/testing' },
617
+ 'pyxfile' : '_libs/testing' ,
618
+ 'include' : []},
609
619
'_libs.window' : {
610
620
'pyxfile' : '_libs/window' ,
611
621
'pxdfiles' : ['_libs/src/skiplist' , '_libs/src/util' ],
612
622
'depends' : ['pandas/_libs/src/skiplist.pyx' ,
613
623
'pandas/_libs/src/skiplist.h' ]},
614
624
'io.sas._sas' : {
615
- 'pyxfile' : 'io/sas/sas' }}
625
+ 'pyxfile' : 'io/sas/sas' ,
626
+ 'include' : numpy_incls }}
616
627
617
628
extensions = []
618
629
0 commit comments