• 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

  • 相关阅读:
    Windows 10 IoT Enterprise 2019 LTSC High End OEM Software 详细介绍
    外贸网站怎么做外链来提高谷歌优化效果?
    java毕业设计——基于java+J2EE+sqlserver的SMART在线考试系统设计与实现(毕业论文+程序源码)——在线考试系统
    css的属性选择器的妙用,来用它实现一个轻量的tips组件吧
    WhatsOnChain中的sCrypt合约验证插件
    C++之策略(Strategy)模式
    计算机毕业设计Java的电影社区网站(源码+系统+mysql数据库+lw文档)
    arthas-线上排查问题工具
    腾讯代码安全指南开源,涉及 C/C++、Go 等六门编程语言
    js数组方法复习汇总
  • 原文地址:https://blog.csdn.net/u010087338/article/details/127865114