-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
ENH: distutils - add add options for "skip:" and "only:" to be passed to f2py #22508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This might be something to consider as part of the CLI rewrite #21923 (@NamamiShanker) since the current CLI is buggy (inconsistent) while handling |
@HaoZeke The background is that I want to use full Fortran capability, e.g., function pointers, etc., but that does not seem possible when For other projects that I only use locally without distribution yet - and for that reason - I make a separate library ( |
This should actually be happening automatically, when using |
It did not work in the past, I think we got around it be including fixed wrappers in the project instead of generating them; it has since been rewritten for use with Meson by a software engineer (@conradtchan from ADACS) to make it ready for the next python release, I have not had time to study the resulting code base in detail. It is in the |
I tested the code in ❯ f2py -m _solver -h solver.pyf --f2cmap .f2py_f2cmap solver.f90 only: fitness_ fitness_m_ get_complete_matrix_ get_complete_inverse_ : --overwrite-signature diff --git i/src/starfit/fitness/solver.pyf w/src/starfit/fitness/solver.pyf
index ad67e06..4b0224b 100644
--- i/src/starfit/fitness/solver.pyf
+++ w/src/starfit/fitness/solver.pyf
@@ -1,7 +1,7 @@
! -*- f90 -*-
! Note: the context of this file is case sensitive.
-python module _solver ! in
+python module _solver ! in
interface ! in :_solver
subroutine fitness_(f,c,obs,err,det,cov,abu,nel,ncov,nstar,nsol,ls,icdf,flags) ! in :_solver:solver.f90
use fitting, only: fitness
@@ -12,7 +12,7 @@ python module _solver ! in
real(kind=real64) dimension(nel),intent(in),depend(nel) :: err
real(kind=real64) dimension(nel),intent(in),depend(nel) :: det
real(kind=real64) dimension(nel,ncov),intent(in),depend(nel) :: cov
- real(kind=real64) dimension(nsol,nstar,nel),intent(in),depend(nel,nstar,nsol) :: abu
+ real(kind=real64) dimension(nsol,nstar,nel),intent(in),depend(nsol,nel,nstar) :: abu
integer(kind=int64), optional,intent(in),check(shape(obs, 0) == nel),depend(obs) :: nel=shape(obs, 0)
integer(kind=int64), optional,intent(in),check(shape(cov, 1) == ncov),depend(cov) :: ncov=shape(cov, 1)
integer(kind=int64), optional,intent(in),check(shape(c, 1) == nstar),depend(c) :: nstar=shape(c, 1)
@@ -24,13 +24,13 @@ python module _solver ! in
subroutine fitness_m_(f,c,obs,err,det,cov,abu,nel,ncov,nstar,nsol,ls,icdf,flags) ! in :_solver:solver.f90
use fitting, only: fitness_m
use typedef, only: real64,int64
- real(kind=real64) dimension(nsol,nel,nel),intent(out),depend(nel,nsol) :: f
+ real(kind=real64) dimension(nsol,nel,nel),intent(out),depend(nsol,nel) :: f
real(kind=real64) dimension(nsol,nstar),intent(in,out) :: c
real(kind=real64) dimension(nel),intent(in) :: obs
real(kind=real64) dimension(nel),intent(in),depend(nel) :: err
real(kind=real64) dimension(nel),intent(in),depend(nel) :: det
real(kind=real64) dimension(nel,ncov),intent(in),depend(nel) :: cov
- real(kind=real64) dimension(nsol,nstar,nel),intent(in),depend(nel,nstar,nsol) :: abu
+ real(kind=real64) dimension(nsol,nstar,nel),intent(in),depend(nsol,nel,nstar) :: abu
integer(kind=int64), optional,intent(in),check(shape(obs, 0) == nel),depend(obs) :: nel=shape(obs, 0)
integer(kind=int64), optional,intent(in),check(shape(cov, 1) == ncov),depend(cov) :: ncov=shape(cov, 1)
integer(kind=int64), optional,intent(in),check(shape(c, 1) == nstar),depend(c) :: nstar=shape(c, 1)
@@ -52,7 +52,7 @@ python module _solver ! in
integer(kind=int64) intent(in) :: icdf
end subroutine get_complete_matrix_
subroutine get_complete_inverse_(m1,obs,err,det,cov,nel,ncov,icdf) ! in :_solver:solver.f90
- use star_data, only: set_star_data,get_complete_matrix
+ use star_data, only: set_star_data,get_complete_inverse
use typedef, only: real64,int64
real(kind=real64) dimension(nel,nel),intent(out),depend(nel) :: m1
real(kind=real64) dimension(nel),intent(in) :: obs
@@ -63,9 +63,9 @@ python module _solver ! in
integer(kind=int64), optional,intent(in),check(shape(cov, 1) == ncov),depend(cov) :: ncov=shape(cov, 1)
integer(kind=int64) intent(in) :: icdf
end subroutine get_complete_inverse_
- end interface
+ end interface
end python module _solver
-! This file was auto-generated with f2py (version:1.23.5).
+! This file was auto-generated with f2py (version:2.0.0.dev0+git20231111.9340fca).
! See:
! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e So I'm going to close this for now.. but please free to reopen if there's something I missed :) |
Proposed new feature or change:
Would it be possible to add feature for
skip:
and andonly:
to be passed to thef2py
call innumpy.distutils.Extension
?The documentation says
Passing on these extra lists would be very useful. It seems currently not possible or at least not documented.
If a workaround could be suggested and documented, that would also be very much appreciated.
The text was updated successfully, but these errors were encountered: