[Numpy-discussion] next NumPy triage meeting

2022-09-04 Thread Inessa Pawson
The next NumPy triage meeting will be held this Wednesday, September 7th at
16:00 (4 pm) UTC. This is a meeting where we synchronously triage
prioritized PRs and issues.
Join us via Zoom:
https://us06web.zoom.us/j/82096749952?pwd=MW9oUmtKQ1c3a2gydGk1RTdYUUVXZz09
Everyone is welcome to attend and contribute to a conversation.

Please notify us of issues or PRs that you’d like to have reviewed by
adding a GitHub link to them in the meeting agenda:
https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg.

Cheers,
Inessa Pawson
Contributor Experience Lead | NumPy
https://numpy.org/
GitHub: inessapawson
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: f2py compile error with full path of signature file on Windows

2022-09-04 Thread Ralf Gommers
On Fri, Aug 26, 2022 at 5:52 PM Johann Rohwer  wrote:

> Hi all,
>
> First of all, I am not sure if this is the correct forum for f2py-related
> questions, but since f2py is part of numpy I thought I'd start here. Please
> point me to the correct place if I am mistaken.
>
This is the right mailing list indeed. Although f2py knowledge is a bit
scarce, and the few people that tend to work actively on f2py are more
responsive on GitHub I think. So opening an issue at
https://github.com/numpy/numpy/issues may yield a better response.

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 use
> scikit-build because of the deprecation of distutils (the package
> contains 2 Fortran extension modules wrapped with f2py). To get to know
> the system I’ve started with a minimal example. I have been getting compile
> failures on Windows (on Linux and macOS everything works).
>
> 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:
>
>- python - f2py compile error with signature file on Windows - Stack
>Overflow
>
> 
>- Fortran language discourse group
>
> 
>
> Minimal example:
>
> *hi.f*
>
>   SUBROUTINE HELLO()
>   PRINT*,"Hello from fortran"
>   END
>
> *hi.pyf*
>
> !-*- f90 -*-
> ! Note: the context of this file is case sensitive.
>
> python module hi ! in
> interface  ! in :hi
> subroutine hello ! in :hi:hi.f
> end subroutine hello
> end interface end python module hi
>
> ! This file was auto-generated with f2py (version:1.23.2).
> ! See:
> ! 
> https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e
>
> 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.
>
It's probably CMake doing that. Ninja is agnostic to that. In SciPy we have
.pyf files, but by design Meson writes out the `build.ninja` with only
relative paths for anything inside the source tree. So we haven't seen this
issue before.

That said, I agree that it's still expected to work with absolute paths
though, so it looks like an f2py bug.

It's probably not super hard to fix for one of the f2py folks with access
to a Windows machine. It may take a little while though - but please do
open a new issue.

Cheers,
Ralf


To ensure that it is not a problem with the skbuild build system I verified
> that the failure can be reproduced on the command line using f2py on its
> own as follows - copy the Fortran files above to the same folder and then
> run in a command prompt:
>
> (skbuild) Z:\Documents\Python\skbuild_test\simple\hello\shout>f2py.exe -m hi 
> -c hi.pyf hi.f
>
> (works and generates the .pyd and .dll files)
>
> However, specifying the full path, fails:
>
> (skbuild) Z:\Documents\Python\skbuild_test\simple\hello\shout>f2py.exe -m hi 
> -c Z:/Documents/Python/skbuild_test/simple/hello/shout/hi.pyf 
> Z:/Documents/Python/skbuild_test/simple/hello/shout/hi.frunning buildrunning 
> config_ccINFO: unifing config_cc, config, build_clib, build_ext, build 
> commands --compiler optionsrunning config_fcINFO: unifing config_fc, config, 
> build_clib, build_ext, build commands --fcompiler optionsrunning 
> build_srcINFO: build_srcINFO: building extension "hi" sourcescreating 
> C:creating C:Userscreating C:Users\jrcreating C:Users\jr\AppDatacreating 
> C:Users\jr\AppData\Localcreating C:Users\jr\AppData\Local\Tempcreating 
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jhcreating 
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10creating 
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documentscreating
>  
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Pythoncreating
>  
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_testcreating
>  
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simplecreating
>  
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simple\hellocreating
>  
> C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simple\hello\shoutINFO:
>  f2py options: []INFO: f2py: 
> Z:/Documents/Python/skbuild_test/simple/hello/shout/hi.pyferror: [WinError 
> 123] The filename, directory name, or volume label syntax is incorrect: 
> 'C:C:\\Users\\jr\\AppData\\Local\\Temp\\tmpdbudw6jh\\src.win-amd64-3.10\\Documents\\Python\\skbuild_test\\simple\\hello\\shout'
>
> The probl