在自定义python包中使用cppimport

xggvc2p6  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(288)

我试图在自定义python模块中的一个文件中使用cppimport。当我从https://test.pypi.org/,cppimport找不到与所有其他文件一起打包的c++文件。下面是我的setup.py文件。这里面有我遗漏的东西吗?

from setuptools.extension import Extension
import numpy as np
from Cython.Build import cythonize

# with open("README.md", "r", encoding="utf-8") as f:

# long_description = f.read()

long_description = ''

install_requires = [
    'numpy',
    'pandas',
    'cppimport',
    'gensim',
    'stop_words',
    'numba',
    'cython',
    'tqdm'
    ]

# name is what you pip install

# name doesn't have to be the name of the python code that people will import, usually they are the same

# sometimes they are different

# py_modules: list of the actual python code modules, this is the code that we want to distribute.

# this is what people import, not what they pip install

setup(
    name='',
    version='0.0.9',
    author="All of Us",
    description='',
    url="https://github.com/",
    long_description=long_description,
    license = "LICENSE.txt",
    ext_modules = cythonize("src/cython_gibbs.pyx"),
    include_dirs=[np.get_include()],
    py_modules=["lda", "numba_gibbs"],  # packages=["lda", "numba_gibbs"]
    include_package_data=True,
    install_requires = install_requires,
    package_dir={'': 'src'}
)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题