Skip to content

Conversation

@piyushrpt
Copy link
Collaborator

f2py compiler for py311+ on OS-X scans code explicitly for data types of arguments in functions and subroutines. Implicit declarations are not interpreted, causing wheel builds to fail. The fortran compiler/ f2py setup on linux seems to be fine with this code and wheels build fine already.

This results in errors such as

In: :solid:src/pysolid/solid.for:detide
        vars2fortran: No typespec for argument "mjd".

piyushrpt and others added 5 commits November 5, 2022 00:36
@yunjunz yunjunz self-requested a review November 5, 2022 18:05
@yunjunz yunjunz requested a review from jhkennedy November 5, 2022 18:22
@yunjunz
Copy link
Member

yunjunz commented Nov 5, 2022

Thank you @piyushrpt for the Fortran code change!

Since the pyproject.toml support in setuptools is introduced in version 61.0 (https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html). I have to bring back a few key configs in setup.py since we are pining setuptools<60 here. The macOS building is still failing. Any idea?

If we could not figure out the solution. Merging the fortran change only sounds good to me too.

@piyushrpt
Copy link
Collaborator Author

I'm giving it a last try with explicit numpy < 1.23.0 . The oldest_possible_numpy for py311 is 1.23.x and that might be the issue we are seeing in that particular case. I think it might be worth it to convert this code to C. Looking at it when adding explicit types - it should be straight forward.

@jhkennedy
Copy link
Collaborator

@piyushrpt going to C so we could leverage pybind11 instead of f2py would definitely make this more maintainable long term.

@piyushrpt
Copy link
Collaborator Author

The other option is to disable 3.11+ on osx if this doesn't work

@piyushrpt
Copy link
Collaborator Author

:( The very last thing to try is to set env variable SETUPTOOLS_USE_DISTUTILS=stdlib

Not sure where it goes. Possibly here:

@yunjunz
Copy link
Member

yunjunz commented Nov 6, 2022

:( The very last thing to try is to set env variable SETUPTOOLS_USE_DISTUTILS=stdlib

Let's give it a shot. Otherwise "disable 3.11+ on osx" sounds good to me.

I do like to convert this to C at some point, would probably have some time next spring for it. You are more than welcome to try it too!

Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yunjunz yunjunz changed the title Update solid.for for explicit argument types update solid.for for explicit arg types + attempt to fix pip install by pin setuptools/numpy Nov 6, 2022
@yunjunz yunjunz merged commit 510728c into insarlab:main Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants