[英]Why does `setup.py develop` not work?
I would like to install my Python module in development mode. 我想在开发模式下安装我的Python模块。 As I have seen in many examples python setup.py develop
is supposed to do that. 正如我在许多例子中看到的那样, python setup.py develop
应该这样做。 But the develop
command does not exist for my setup.py
file: 但是我的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"])
(Note the Cython extension module). (注意Cython扩展模块)。
What am I missing? 我错过了什么? Do I need to modify the setup.py
? 我需要修改setup.py
吗?
The develop
command is a part of setuptools . develop
命令是setuptools的一部分。 Install setuptools and replace the first line in setup.py
with this: 安装setuptools并将setup.py
的第一行替换为:
from setuptools import setup
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.