Compiled Python Package

I am looking for a python package release that includes an existing fortran or C program. Fortran / C compiled by running

./configure
make

The python code calls the resulting binary calls through subprocesses (i.e. the code is not actually completed as such). I would like the user to ever print

python setup.py install

fortran / C program is first compiled with the commands ./configureand makethen I want python module has been installed and the binary file, which will be installed in python directory bin/, along with executable files, which are usually installed with the option scripts=to distutils.core.setup.

Firstly, are there any problems with this? And if not, what is the best way to do this through setup.py? Are there existing functions for automation ./configureand make, since this is pretty standard? Or should I just use calls os.system? And anyway, where should these teams go to setup.py? Then should I makeoutput the binary, for example scripts/, and then scripts=['scripts/mybinary']in the function setup()?

+3
source share
2 answers

Do not make it too complicated.

Just list them as separate README elements that say - basically - what you said in the question.

  • Create a Fortran / C file with ./configure; make; make install.

  • Setting up Python with python setup.py install.

. , .

"" , Fortran/C PATH, Python script PATH.

, , . . , .

+2

python C C- f2py fortran. python .

0

Source: https://habr.com/ru/post/1736244/


All Articles