Here's my directory structure,
├── test
│ ├── test.f90
│ ├── __init__.py
│ └── test.py
Now I want to make a package from this with an command line tool test.
Now I have two options, 1. numpy distutils and 2. setuptools.
Problem with distutils is that it doesn't support entry points and it is also not recomended now. But it does compile the fortran code perfectly.
Now as for setuptools I'm trying to use this code,
mod = Extension(name = 'foo.adt', sources = ['test/test.f90'])
setup(
name = 'foo',
packages = ['foo'],
package_dir = {'foo':'test'},
ext_modules = [mod],
entry_points={
'console_scripts': [
'hello = foo.test:main',
],
}
)
If I try to use this, it's throwing this error
error: unknown file type '.f90' (from 'test/test.f90')
So, I guess setuptools doesn't support fortran files? So, how do I compile the fortran code, create the package and create a entry point for that?