Comments (6)
are you aware of a good alternative? What is there, other than removing the shebang and forcing people to use the python
command?
from scipy.
I guess it is okay for people to use the shebang instead of using python generate_f2pymod.py
. But the meson build should not do that on it's own.
Ideas:
- Using a
#!/usr/bin/env python3
shebang so that at least builds inside a venv do not use the system python3 - reverting part of #20121 so that meson always uses the current runtime interpreter for the python script
- having meson generate the script with the correct shebang from a
generate_f2pymod.py.src
andtempita.py
(But that's a bit convoluted isn't it?
from scipy.
cc @rgommers
from scipy.
Hmm, when omitting the --no-build-isolation
, meson actually does the right thing:
python3.12 -m pip -v wheel .
...
Installing collected packages: ply, setuptools, pybind11, packaging, numpy, meson, gast, Cython, pyproject-metadata, beniget, pythran, meson-python
Successfully installed Cython-3.0.10 beniget-0.4.1 gast-0.5.4 meson-1.4.0 meson-python-0.16.0 numpy-2.0.0rc1 packaging-24.0 ply-3.11 pybind11-2.12.0 pyproject-metadata-0.8.0 pythran-0.15.0 setuptools-69.5.1
...
Running command Preparing metadata (pyproject.toml)
+ meson setup /scipy-1.13.0 /scipy-1.13.0/.mesonpy-wrowlhu5 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/scipy-1.13.0/.mesonpy-wrowlhu5/meson-python-native-file.ini
...
Program python found: YES (/usr/bin/python3.12)
...
Program tools/generate_f2pymod.py found: YES (/usr/bin/python3.12 /scipy-1.13.0/tools/generate_f2pymod.py)
Related: mesonbuild/meson-python#23
from scipy.
Ah, sorry about that - that's a regression indeed. For code generation scripts that don't need numpy/cython, the shebang is preferred. But for these cases that's wrong indeed.
That part of gh-20121 should be reverted. I'd like to think a bit more about:
- whether to add a
generator
for f2py, so that thepy3
doesn't need to be copied everywhere, - if it's possible to use the build (native) Python with f2py/cython rather than the host (cross) Python. Perhaps by invoking
f2py
rather thanpython -m f2py
.
from scipy.
Related Issues (20)
- DEP: deprecate and remove remaining usages of slur-adjacent "trapz" HOT 2
- BUG: When given invalid bounds, `_minimize_neldermead` raises `TypeError` instead of `ValueError` HOT 1
- ENH: scipy.signal.find_peaks for 2D signals HOT 12
- BUG: Cannot find `OpenBLAS` on Cygwin HOT 21
- DOC: linalg.solve_discrete_lyapunov: dead reference link HOT 2
- ENH: Distances between distributions with complex samples HOT 1
- BUG: special.hyp2f1: local test failure HOT 3
- ENH: constants: Add Muon Gyromagnetic ratio HOT 3
- BUG: special.spherical_in: derivative at `z=0, n=1` incorrect HOT 4
- BUG: build issue on Ubuntu 22.04 HOT 9
- DOC: Clarify behavior of `sparse.csgraph.dijkstra` for `directed=False`
- BUG: `eigh` fails for size 1 array with driver=evd HOT 1
- BUG: Empty CSR Matrix has multiple indptr instead of 1 HOT 3
- CI/BLD: Nightly wheel builds failing for macOS x86_64 HOT 2
- BUG: special: elliptic integral incorrectly gives `nan` HOT 3
- BUG: warning from `optimize.least_squares` for astropy with OpenBLAS 0.3.26-dev HOT 32
- BUG: spatial: `Rotation.apply` is slow - replace `np.einsum` with `@`?
- BUG: pytest scipy/linalg/tests/test_extending.py fails with Cython file compilation error HOT 10
- ENH: stats: add array API-support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scipy.