Skip to main content

GenericF2PY demostrates how to handle FORTRAN binaries in python modules.

Project description,3.5,3.6,3.7&color=blue

Genericf2Py Demostrates How To Handle Fortran Binaries In Python Modules.

See the Code at:

See the Docs at:

See PyPI page at:


GenericF2PY focuses on the use of f2py for integrating FORTRAN modules into python PyPI projects.

GenericF2PY has the following goals:

  • Support a variety of platforms Windows/Linux/MacOS/etc.
  • Support a variety of python distributions (2 & 3).
  • Support both 32 & 64 bit installations.

Based on my experience developing GenericF2PY, I believe the best way to achieve the above goals is:

  • Distribute only source code (Python & FORTRAN).
  • Provide guidance for setting up f2py on the user’s platform.
  • Recommend users install with “pip install <packagename>”.
  • Provide guidance for correcting any error messages.

Binary Distributions

When binary distributions install properly, they are the most convenient approach for users… HOWEVER

When binary distributions fail, they can be confounding for many users and greatly impede or even preclude the use of your project for those users.

The sheer difficulty of maintaining binaries for all possible systems can become overwhelming.

Binary distributions can fail for a variety of reasons:

  • Compiled against wrong version of numpy
  • Missing or wrong version of system libraries
  • Environment variable problems (PATH, LIBRARY_PATH, CC, GCC, etc.)
  • Security Restrictions
  • Unknown Unknowns

It is for these reasons, that I recommend distributing source code only.

I’m weighing the user’s difficulty of installing f2py against the user’s difficulty of debugging your potentially failed binary distribution and deciding that installing f2py is the smaller burden. Also, the user can Google f2py and find answers. You will be the user’s only source of information on your binaries for all possible systems.

If you want to make binary distributions available, it might be best to either:

  • create binary wheels in a Github pip-wheels directory
  • provide an option to install from source code.

Users can be directed to that Github pip-wheels directory or given source-install instructions as required.

Keywords: genericf2py setuptools development Platform: any Classifier: Development Status :: 4 - Beta Classifier: Operating System :: OS Independent Classifier: Intended Audience :: Developers Classifier: Intended Audience :: End Users/Desktop Classifier: Topic :: Software Development :: Build Tools Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Description-Content-Type: text/x-rst Provides-Extra: dev Provides-Extra: test

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for genericf2py, version 0.1.19
Filename, size File type Python version Upload date Hashes
Filename, size genericf2py-0.1.19.tar.gz (209.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page