fimport
Python import hook for importing Fortran modules.
Usage:
import fimport fimport.install(reload_support=True) import somefortrancode # <- builds and imports somefortrancode.f90
But why in the world would you want that? One reason is interactive use, where being able to reload modules is often very convenient.
This code is based on Cython’s pyximport module.
Build customization
A custom numpy.distutils.core.Extension instance and setup() args (Distribution) for for the build can be defined by a <modulename>.fbld file, such as:
import os
from numpy.distutils.core import Extension
def make_ext(modname, ffilename):
cwd = os.path.dirname(__file__)
return Extension(name=modname,
sources=[ffilename, 'other_file.f90'],
f2py_options=['only:', 'some_subroutine', ':'],
libraries=['lapack', 'blas'],
library_dirs=[cwd],
include_dirs=['/myinclude', cwd])
def make_setup_args():
return dict(script_args=["--fcompiler=gnu"])
Extra dependencies can be listed in a <modulename>.fdep:
other_file.f90 some_include.inc examplemodule.fbld
Metadata
Release files for fimport 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fimport-0.2.tar.gz | 11.2 kB | Without provenance | Details for fimport-0.2.tar.gz |
Release files / fimport-0.2.tar.gz
| Download URL | fimport-0.2.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
663c799c004ae2cf4846b595889e7a962df415fa193e588470e804792e1d2f95
|
|
BLAKE2b-256 checksum How to use checksums |
c7d3eafa7f8dc572b0bd9a909b7f9348e9d09fec508f13febad6a9fafde4e811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for fimport 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.