我想在开发模式下安装我的Python模块。正如我在许多例子中所看到的,python setup.py develop应该这样做。但是,对于我的develop文件,不存在setup.py命令:
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吗
发布于 2014-01-08 13:54:00
develop命令是setuptools工具的一部分。安装setuptools并将setup.py中的第一行替换为:
from setuptools import setuphttps://stackoverflow.com/questions/20996639
复制相似问题