如何将带有Cython的Python包上传到PyPI?

时间:2019-07-11 20:19:38

标签: python package cython pypi

如果我的.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/

0 个答案:

没有答案