-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: list proper deps for tslib #18117
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 all commits
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 |
---|---|---|
|
@@ -474,7 +474,8 @@ def pxd(name): | |
'pandas/_libs/src/datetime/np_datetime_strings.h'] | ||
np_datetime_sources = ['pandas/_libs/src/datetime/np_datetime.c', | ||
'pandas/_libs/src/datetime/np_datetime_strings.c'] | ||
tseries_depends = np_datetime_headers + ['pandas/_libs/src/datetime.pxd'] | ||
tseries_depends = np_datetime_headers + ['pandas/_libs/src/datetime.pxd', | ||
'pandas/_libs/tslibs/np_datetime.pxd'] | ||
|
||
# some linux distros require it | ||
libraries = ['m'] if not is_platform_windows() else [] | ||
|
@@ -522,6 +523,10 @@ def pxd(name): | |
'pandas/_libs/src/parser/io.c']}, | ||
'_libs.period': { | ||
'pyxfile': '_libs/period', | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/lib', | ||
'_libs/tslibs/timezones', | ||
'_libs/tslibs/nattype'], | ||
'depends': tseries_depends + ['pandas/_libs/src/period_helper.h'], | ||
'sources': np_datetime_sources + ['pandas/_libs/src/period_helper.c']}, | ||
'_libs.properties': { | ||
|
@@ -535,15 +540,24 @@ def pxd(name): | |
'depends': _pxi_dep['sparse']}, | ||
'_libs.tslib': { | ||
'pyxfile': '_libs/tslib', | ||
'pxdfiles': ['_libs/src/util'], | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/src/khash', | ||
'_libs/tslibs/conversion', | ||
'_libs/tslibs/timedeltas', | ||
'_libs/tslibs/timezones', | ||
'_libs/tslibs/nattype'], | ||
'depends': tseries_depends, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.conversion': { | ||
'pyxfile': '_libs/tslibs/conversion', | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/tslibs/timezones', | ||
'_libs/tslibs/timedeltas'], | ||
'depends': tseries_depends, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.fields': { | ||
'pyxfile': '_libs/tslibs/fields', | ||
'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. The functions defined in util are evidently copy/pasted in the generated C code here even without this entry being present. See previous question about "what is this intended to do?" 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 these are orthogonal, e.g. the dependency based compilation and the actual c code generation. |
||
'depends': tseries_depends, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.frequencies': { | ||
|
@@ -557,18 +571,27 @@ def pxd(name): | |
'depends': np_datetime_headers, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.offsets': { | ||
'pyxfile': '_libs/tslibs/offsets'}, | ||
'pyxfile': '_libs/tslibs/offsets', | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/tslibs/conversion']}, | ||
'_libs.tslibs.parsing': { | ||
'pyxfile': '_libs/tslibs/parsing', | ||
'pxdfiles': ['_libs/src/util']}, | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/src/khash']}, | ||
'_libs.tslibs.strptime': { | ||
'pyxfile': '_libs/tslibs/strptime', | ||
'pxdfiles': ['_libs/src/util', | ||
'_libs/tslibs/nattype'], | ||
'depends': tseries_depends, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.timedeltas': { | ||
'pyxfile': '_libs/tslibs/timedeltas'}, | ||
'pyxfile': '_libs/tslibs/timedeltas', | ||
'pxdfiles': ['_libs/src/util'], | ||
'depends': np_datetime_headers, | ||
'sources': np_datetime_sources}, | ||
'_libs.tslibs.timezones': { | ||
'pyxfile': '_libs/tslibs/timezones'}, | ||
'pyxfile': '_libs/tslibs/timezones', | ||
'pxdfiles': ['_libs/src/util']}, | ||
'_libs.testing': { | ||
'pyxfile': '_libs/testing'}, | ||
'_libs.window': { | ||
|
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.
Does it matter that
np_datetime
is included in 'depends' viatseries_depends
but not in 'pxdfiles'?Putting e.g. conversion.pxd into tslib's 'pxdfiles' entry adds it to the
sources
kwarg of Extension. Why is that the desired outcome? (and uh, what does that do? the distutils docs don't actually say anything useful)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.
the disutils docs are pretty bad.
I went with the premise that if we are cimporting then we care if the api changes. to test is easy, change something in nattype.pxd, you get recompiles in lots of things, but not everything (e.g. fields/frequencies and such). change timedeltas.pxd and you get less.
this has the desired behavior of only dependency based compilation.
I think the sources/depends are actually much more on the c-level and are separate from this. (but I don't think this is really an issue as we basically include _libs/src in the compilation each time so that the c-headers are there).