Don't touch my shebang

后端 未结 5 1688
轻奢々
轻奢々 2020-11-30 04:15

One thing I hate about distutils (I guess he is the evil who does this) is that it changes the shebang line. In other words, the more rational and environment-vars decided s

5条回答
  •  清歌不尽
    2020-11-30 04:33

    In one of the latest versions of distutils, there is a flag --no-autoreq that have worked for me:

    --no-autoreq         do not automatically calculate dependencies
    

    In my case, I was creating RPM files with python2.4 executable, in a server with both 2.4 and 2.6 installations. bdist just left the shebangs as they were, after running:

    python setup.py bdist_rpm --no-autoreq
    

    In the case that you are handling the spec files, you may use the solution explained at https://stackoverflow.com/a/7423994/722997, adding:

    AutoReq: no
    

提交回复
热议问题