python distutils not include the SWIG generated module

后端 未结 3 1961
余生分开走
余生分开走 2021-02-18 17:52

I am using distutils to create an rpm from my project. I have this directory tree:

project/
        my_module/
                 data/file.dat
                 my         


        
3条回答
  •  遥遥无期
    2021-02-18 18:46

    It's not a complete answer, because I don't have the complete solution. The reason why the module is not copied to the install directory is because it wasn't present when the setup process tried to copy it. The sequence of events is:

    running install
    running build
    running build_py
    file my_module.py (for module my_module) not found
    file vcanmapper.py (for module vcanmapper) not found
    running build_ext
    

    If you run a second time python setup.py install it will do what you wanted in the first place. The official SWIG documentation for Python proposes you run first swig to generate the wrap file, and then run setup.py install to do the actual installation.

提交回复
热议问题