(torch110) hl@ser01:~/code/fairseq$
- python setup.py build_ext --inplace
-
- --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