如果我的.pyx
,.c
和.so
在目录packageName
中。如何使我的软件包无需Cython即可安装和导入?我认为我需要在软件包中包含.c
个文件吗?
这是我的setup.py
import setuptools
from distutils.core import setup
from distutils.extension import Extension
extensions = [
Extension('packageName.cython1', ['packageName/cython1.c']),
Extension('packageName.cython2', ['packageName/cython2.c']),
Extension('packageName.cython3', ['packageName/cython3.c']),
]
cmdclass = {}
NAME = 'packageName'
VERSION = '0.0.1'
setup(
name=NAME,
version=VERSION,
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
ext_modules=extensions,
cmdclass=cmdclass,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
我的错误是:
HTTPError: 400 Client Error: Binary wheel 'packageName-0.3.1-cp37-cp37m-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'. for url: https://test.pypi.org/legacy/