Skip to content
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

python-stratify #2393

Merged
merged 3 commits into from
Feb 10, 2017
Merged

python-stratify #2393

merged 3 commits into from
Feb 10, 2017

Conversation

bjlittle
Copy link
Contributor

@bjlittle bjlittle commented Feb 9, 2017

No description provided.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/python-stratify) and found it was in an excellent condition.

@ocefpaf
Copy link
Member

ocefpaf commented Feb 10, 2017

The Windows error:

stratify\_vinterp.c(2756) : warning C4013: 'isnan' undefined; assuming extern returning int
stratify\_vinterp.c(2862) : error C2065: 'NAN' : undeclared identifier
stratify\_vinterp.c(2929) : error C2065: 'INFINITY' : undeclared identifier
stratify\_vinterp.c(2949) : error C2065: 'INFINITY' : undeclared identifier
stratify\_vinterp.c(4824) : error C2065: 'NAN' : undeclared identifier
stratify\_vinterp.c(29872) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
stratify\_vinterp.c(29878) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\cl.exe' failed with exit status 2

sounds familiar. @gillins is this something easy to fix?

Full log: https://ci.appveyor.com/project/conda-forge/staged-recipes/build/1.0.11360/job/4cv9tm37tw3a97os

@bjlittle
Copy link
Contributor Author

bjlittle commented Feb 10, 2017

@ocefpaf Wow, that was fast ... I don't have a windows setup, so I'm struggling to investigate this issue.

Seems like the isnan etc are not in the windows math.h but live somewhere else in another lib and include .. don't know where though. Any help/guidance would be just awesome!

Interesting it's only for the python27 windows build ...

I'd rather not skip the windows build if this is an easy fix 😉

@ocefpaf
Copy link
Member

ocefpaf commented Feb 10, 2017

Any help/guidance would be just awesome!

I have a faint memory that I saw this before but I cannot remember where. I will research the other feedstocks later to see if I can find it. (Skipping Window is OK for now.)

@ocefpaf
Copy link
Member

ocefpaf commented Feb 10, 2017

@bjlittle I am merging this so I can work on the Windows issue in the feedstock.

@ocefpaf ocefpaf merged commit c40e6f9 into conda-forge:master Feb 10, 2017
@ocefpaf
Copy link
Member

ocefpaf commented Feb 10, 2017

@bjlittle see SciTools/python-stratify#8 for a possible fix.

@gillins
Copy link
Contributor

gillins commented Feb 12, 2017

Sorry for delay - use _isnan and _isfinite on VC 2008 (Python 2.7).

@ocefpaf
Copy link
Member

ocefpaf commented Feb 12, 2017

Sorry for delay - use _isnan and _isfinite on VC 2008 (Python 2.7).

No problem. Thanks for the feedback! What do you think of the approach I took in SciTools/python-stratify#8 ?

cdef extern from "numpy/npy_math.h" nogil:
    bint isnan "npy_isnan"(long double)
    float NAN "NPY_NAN"
    float INFINITY "NPY_INFINITY"

@gillins
Copy link
Contributor

gillins commented Feb 12, 2017

👍 Looks great! Those npy_xxx macros could very handy for portability...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants