首页 > 解决方案 > pip 不构建 .so 文件

问题描述

setuptools.setup(
    name='mat_8',
    version='0.0.1',
    description='Integral Mat-8 Functions',
    install_requires=REQUIRED_PACKAGES,
    packages=setuptools.find_packages(),
    ext_modules=cythonize("mat_8/numerical_calcs.pyx", language_level=3),
    package_data={"mat_8": ["numerical_calcs.pyx",
                            "tables/Beta_tables.json",
                            "tables/F_tables.json",
                            "tables/G_0_Gb_tables.json",
                            "tables/G_0_Gm_tables.json",
                            "tables/G_Gb_tables.json",
                            "tables/G_Gm_tables.json",
                            "tables/Htables.json"
                            ]}
)

这是setup.py配置。mat_8是一个具有空__init__.py文件的 python 包,numerical_calcs.pyx是“mat_8”文件夹的子级。

我正在尝试做这些设置

但是,pip install mat-8-xxx.tar.gz不会创建任何.so文件。如果我使用python setup.py build_ext --inplace,则在文件夹.so下生成mat_8文件。

我假设这是点子问题。错过了一些配置。

标签: python-3.xpipsetup.py

解决方案


推荐阅读