4
我想在開發模式下安裝我的Python模塊。正如我在許多例子中看到python setup.py develop
應該這樣做。但develop
命令不爲我setup.py
文件存在:爲什麼`setup.py develop`不起作用?
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext
import os
src = ["_NetworKit.pyx"] # list of source files
modules = [Extension("_NetworKit",
src,
language = "c++",
extra_compile_args=["-fopenmp", "-std=c++11", "-O3", "-DNOGTEST"],
extra_link_args=["-fopenmp", "-std=c++11"],
libraries=["NetworKit-Core-O"],
library_dirs=["../"])]
for e in modules:
e.cython_directives = {"embedsignature" : True}
setup(name="_NetworKit",
cmdclass={"build_ext": build_ext},
ext_modules=modules,
py_modules = ["NetworKit.py"])
(注意用Cython擴展模塊)。
我錯過了什麼?我需要修改setup.py
嗎?