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

2022-08-26 Thread Johann Rohwer



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.

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 OverflowFortran 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. 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.f
running build
running config_cc
INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
INFO: build_src
INFO: building extension "hi" sources
creating C:
creating C:Users
creating C:Users\jr
creating C:Users\jr\AppData
creating C:Users\jr\AppData\Local
creating C:Users\jr\AppData\Local\Temp
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simple
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simple\hello
creating C:Users\jr\AppData\Local\Temp\tmpdbudw6jh\src.win-amd64-3.10\Documents\Python\skbuild_test\simple\hello\shout
INFO: f2py options: []
INFO: f2py: Z:/Documents/Python/skbuild_test/simple/hello/shout/hi.pyf
error: [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 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 for 
hi.f does work strangely enough, but as soon as the full path for
hi.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

Windows 10 64-bitMSVC 2022 build toolsmingw 11.2.0.07112021python 3.10.6numpy 1.23.2
I have no idea what is going on here.
Thanks,
Johann



The integrity and confidentiality of this email are governed by these terms.
Disclaimer
Die integriteit en vertroulikheid van hierdie e-pos word deur die volgende bepalings bereël.
Vrywaringsklousule


___
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] Grace Hopper Celebration Open Source Day 2022 - Friday, September 16th - call for mentors

2022-08-26 Thread Inessa Pawson
Hi, everyone!
NumPy was selected as a featured project for Grace Hopper Celebration Open
Source Day 2022  (
https://ghc.anitab.org/programs-and-awards/open-source-day/) held on
Friday, September 16th, 8:00 am - 3:00 pm Pacific Time. I’m currently
looking for mentors who would be helping NumPy newcomers during this event.
If you are available, please sign up here:
https://docs.google.com/spreadsheets/d/1Y1t7-Yu2INR-Unl277TCJmlKOSNWok8fX2NbES5jcgk/edit?usp=sharing
.
You may choose to help for 2 hours only or stay longer.

-- 
Cheers,
Inessa

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] ANN: SciPy 1.9.1

2022-08-26 Thread Tyler Reddy
Hi all,

On behalf of the SciPy development team, I'm pleased to announce the
release of SciPy 1.9.1, which is a bug fix release that includes
some important meson build fixes.

Sources and binary wheels can be found at:
https://pypi.org/project/scipy/ and at:
https://github.com/scipy/scipy/releases/tag/v1.9.1

One of a few ways to install this release with pip:
pip install scipy==1.9.1

=
SciPy 1.9.1 Release Notes
=

SciPy 1.9.1 is a bug-fix release with no new features
compared to 1.9.0. Notably, some important meson build
fixes are included.

Authors
==

* Anirudh Dagar (1)
* Ralf Gommers (12)
* Matt Haberland (2)
* Andrew Nelson (1)
* Tyler Reddy (14)
* Atsushi Sakai (1)
* Eli Schwartz (1)
* Warren Weckesser (2)

A total of 8 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully
complete.

Issues closed for 1.9.1
--

* `#14517 `__:
scipy/linalg/tests/test_decomp.py::TestSchur::test_sort test...
* `#16765 `__: DOC:
\`scipy.stats.skew\` no longer returns 0 on constant input
* `#16787 `__: BUG: Can't
build 1.10 with mingw-w64 toolchain and numpy 1.21.6...
* `#16813 `__: BUG:
scipy.interpolate interp1d extrapolate behaviour change...
* `#16878 `__: BUG:
optimize.milp fails to execute when given exactly 3 constraints


Pull requests for 1.9.1
--

* `#16709 `__: BLD: make the way
we count commits for version numbering more...
* `#16736 `__: REL: prep for
SciPy 1.9.1
* `#16749 `__: BLD: install
missing \`.pxd\` files, and update TODOs/FIXMEs...
* `#16750 `__: BLD: make
OpenBLAS detection work with CMake
* `#16755 `__: TST:
sparse.linalg: Loosen tolerance for the lobpcg test 'test_tolerance_float32'
* `#16760 `__: BLD: use a bit
more idiomatic approach to constructing paths...
* `#16768 `__: DOC:
stats.skew/kurtosis: returns NaN when input has only one...
* `#16794 `__: BLD/REL: on
Windows use numpy 1.22.3 as the version to build...
* `#16822 `__: BUG/TST: linalg:
Check the results of 'schur' more carefully.
* `#16825 `__: BUG: interpolate:
fix "previous" and "next" extrapolate logic...
* `#16862 `__: BUG, DOC: Fix
sphinx autosummary generation for \`odr\` and \`czt\`
* `#16881 `__: MAINT:
optimize.milp: fix input validation when three constraints...
* `#16901 `__: MAINT: 1.9.1
backports
* `#16904 `__: BLD: update
dependency ranges for meson-python and pybind11 for...

Checksums
=

MD5
~~~

65d2b065c09d40b07272ae30332f6202  Changelog
69dd050c058c46e67d05956bf06e0566  README.txt
6108e7119fd6ae6d6338adede1904bb7
 scipy-1.9.1-cp310-cp310-macosx_10_9_x86_64.whl
301053451a09b81268734133ce6d7bda
 scipy-1.9.1-cp310-cp310-macosx_12_0_arm64.whl
43a2fa03b951738d0deed6ddbc0a9f4d
 scipy-1.9.1-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl
2339afc328d3c92cf85d1d86c5be4e19
 scipy-1.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d95584ddfe0703ba3b4624001a1f84f7
 scipy-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
01937d372de92b3bcf9196b81bf8041d  scipy-1.9.1-cp310-cp310-win_amd64.whl
3f85c3d508fced31f420ea31dccb1f83
 scipy-1.9.1-cp38-cp38-macosx_10_9_x86_64.whl
3e07b61125901375f3ab99766465a428
 scipy-1.9.1-cp38-cp38-macosx_12_0_arm64.whl
5cb2848a03030d3cec82a406b6d032de
 scipy-1.9.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl
cffdc85788b0d11e00f5c055e303538e
 scipy-1.9.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
ad0b411b353608b9fdd2fb3da25dd9ef
 scipy-1.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fa1872fdcc63b57b95bffdcd2142a54e
 scipy-1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
673905ce31524d16e5d44e600c48ff4d  scipy-1.9.1-cp38-cp38-win32.whl
bc421013525427036272cafa47c41f71  scipy-1.9.1-cp38-cp38-win_amd64.whl
19aa6604a3c39cbcc58f7a626e3fad89
 scipy-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl
0f6312acdf5edf5a6a5d2bf453e1c6cc
 scipy-1.9.1-cp39-cp39-macosx_12_0_arm64.whl
94ab8626a5d2aa5ed936f8571593567b
 scipy-1.9.1-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl
4a9c22a4a05938