Replies: 3 comments
-
@jcfr Thanks for moving this discussion. To follow up, I got this to work by manually specifying See also numpy/numpy#22211 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Incidentally as part of the transition away from distutils, numpy's However, this does not work (yet) with custom |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Originally posted by @jmrohwer in https://groups.google.com/g/scikit-build/c/L7SmriBFeFk/m/0mIeunr_BAAJ
Hi all,
I am trying to port the build system for a python package (GitHub - PySCeS/pysces: The official PySCeS project source code repository.) from
numpy.distutils
to usescikit-build
because of the deprecation ofdistutils
(the package contains 2 Fortran extension modules wrapped withf2py
). To get to know the system I’ve started with a minimal example that I've put together from reading the numpy/f2py and scikit-build documentation. I have been getting compile failures on Windows (on Linux and macOS everything works, I can build and install the module).I have posted this on SO and on the Fortran discourse group but have not had any replies despite quite a number of reads. Perhaps anyone here can help out? Links to the other posts:
Minimal example (I attach the zipped full source tree of the package for reference if needed. See simple.zip):
hi.f
hi.pyf
During compilation with
python setup.py build
the build fails. In tracking it down I saw that ninja/cmake expands the full path of the source files and this is where it fails. To ensure that it is not a problem with theskbuild
build system I verified that the failure can be reproduced on the command line usingf2py
on its own as follows - copy the Fortran files above to the same folder and then run in a command prompt:(works and generates the
.pyd
and.dll
files)However, specifying the full path, fails:
The problem seems to be with the
creating C:Users
part leading to the malformed filename in the last line.Specifying only the filename for
hi.pyf
but the full path forhi.f
does work strangely enough, but as soon as the full path forhi.pyf
is specified it fails. As mentioned, on Linux and macOS all works fine.NOTE:
I could of course skip the
.pyf
file and then it works. However, the Fortran code I’m wrapping is F77 and needs to be redistributed in unmodified form due to licensing conditions, so I do need a custom.pyf
file to integrate it into my Python module.System
I realize this may not be directly related to skbuild, since the error can be reproduced on the command line using only f2py, but perhaps someone here has seen anything similar? I honestly have no idea what is going on here.
Thanks,
Johann
Beta Was this translation helpful? Give feedback.
All reactions