• python setup.py build_ext 增加头文件目录include dir


    (torch110) hl@ser01:~/code/fairseq$

    1. python setup.py build_ext --inplace
    2. --include-dirs=/home/hl/code/fairseq-0.12.2    

    详细参数:

    python setup.py --help build_ext
    Common commands: (see '--help-commands' for more)

      setup.py build      will build the package underneath 'build/'
      setup.py install    will install the package

    Global options:
      --verbose (-v)  run verbosely (default)
      --quiet (-q)    run quietly (turns verbosity off)
      --dry-run (-n)  don't actually do anything
      --help (-h)     show detailed help message
      --no-user-cfg   ignore pydistutils.cfg in your home directory

    Options for 'BuildExtension' command:
      --build-lib (-b)           directory for compiled extension modules
      --build-temp (-t)          directory for temporary files (build by-products)
      --plat-name (-p)           platform name to cross-compile for, if supported
                                 (default: linux-x86_64)
      --inplace (-i)             ignore build-lib and put compiled extensions into
                                 the source directory alongside your pure Python
                                 modules
      --include-dirs (-I)        list of directories to search for header files
                                 (separated by ':')
      --define (-D)              C preprocessor macros to define
      --undef (-U)               C preprocessor macros to undefine
      --libraries (-l)           external C libraries to link with
      --library-dirs (-L)        directories to search for external C libraries
                                 (separated by ':')
      --rpath (-R)               directories to search for shared C libraries at
                                 runtime
      --link-objects (-O)        extra explicit link objects to include in the
                                 link
      --debug (-g)               compile/link with debugging information
      --force (-f)               forcibly build everything (ignore file
                                 timestamps)
      --compiler (-c)            specify the compiler type
      --parallel (-j)            number of parallel build jobs
      --swig-cpp                 make SWIG create C++ files (default is C)
      --swig-opts                list of SWIG command line options
      --swig                     path to the SWIG executable
      --user                     add user include, library and rpath
      --cython-cplus             generate C++ source files
      --cython-create-listing    write errors to a listing file
      --cython-line-directives   emit source line directives
      --cython-include-dirs      path to the Cython include files (separated by
                                 ':')
      --cython-c-in-temp         put generated C files in temp directory
      --cython-gen-pxi           generate .pxi file for public declarations
      --cython-directives        compiler directive overrides
      --cython-gdb               generate debug information for cygdb
      --cython-compile-time-env  cython compile time environment
      --pyrex-cplus              generate C++ source files
      --pyrex-create-listing     write errors to a listing file
      --pyrex-line-directives    emit source line directives
      --pyrex-include-dirs       path to the Cython include files (separated by
                                 ':')
      --pyrex-c-in-temp          put generated C files in temp directory
      --pyrex-gen-pxi            generate .pxi file for public declarations
      --pyrex-directives         compiler directive overrides
      --pyrex-gdb                generate debug information for cygdb
      --help-compiler            list available compilers

    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

  • 相关阅读:
    git clone http/https 报错 10054/443 问题
    MMSegmentation训练自己的语义分割数据集
    【Deep Learning 5】卷积神经网络CNN
    Linux文件系统的功能规划
    Jmeter进行HTTPS接口压测及SSL证书验证
    使用shell脚本在Linux中管理Java应用程序
    20种有潜力的新材料
    传统算法与神经网络算法,神经网络算法包括哪些
    功率放大器TDA7851L
    bat脚本学习(一)
  • 原文地址:https://blog.csdn.net/u010087338/article/details/127865114