fix wheel build
This commit is contained in:
parent
8699de6106
commit
5157b341a0
13
setup.py
13
setup.py
|
@ -1,4 +1,5 @@
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
from distutils.extension import Extension
|
||||||
from Cython.Build import cythonize
|
from Cython.Build import cythonize
|
||||||
import numpy, os, sys
|
import numpy, os, sys
|
||||||
|
|
||||||
|
@ -10,6 +11,17 @@ else:
|
||||||
os.environ['CFLAGS'] = '-mavx -mavx2 -mfma -mf16c -O3 -std=c11'
|
os.environ['CFLAGS'] = '-mavx -mavx2 -mfma -mf16c -O3 -std=c11'
|
||||||
os.environ['CXXFLAGS'] = '-mavx -mavx2 -mfma -mf16c -O3 -std=c++11'
|
os.environ['CXXFLAGS'] = '-mavx -mavx2 -mfma -mf16c -O3 -std=c++11'
|
||||||
|
|
||||||
|
ext_modules = [
|
||||||
|
Extension(
|
||||||
|
name="whispercpp",
|
||||||
|
sources=["whispercpp.pyx", "whisper.cpp/whisper.cpp"],
|
||||||
|
language="c++",
|
||||||
|
extra_compile_args=["-std=c++11"],
|
||||||
|
)
|
||||||
|
]
|
||||||
|
ext_modules = cythonize(ext_modules)
|
||||||
|
|
||||||
|
whisper_clib = ('whisper_clib', {'sources': ['whisper.cpp/ggml.c']})
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='whispercpp',
|
name='whispercpp',
|
||||||
|
@ -17,6 +29,7 @@ setup(
|
||||||
description='Python bindings for whisper.cpp',
|
description='Python bindings for whisper.cpp',
|
||||||
author='Luke Southam',
|
author='Luke Southam',
|
||||||
author_email='luke@devthe.com',
|
author_email='luke@devthe.com',
|
||||||
|
libraries=[whisper_clib],
|
||||||
ext_modules = cythonize("whispercpp.pyx"),
|
ext_modules = cythonize("whispercpp.pyx"),
|
||||||
include_dirs = ['./whisper.cpp/', numpy.get_include()],
|
include_dirs = ['./whisper.cpp/', numpy.get_include()],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!python
|
#!python
|
||||||
# cython: language_level=3
|
# cython: language_level=3
|
||||||
# distutils: language = c++
|
|
||||||
# distutils: sources= ./whisper.cpp/whisper.cpp ./whisper.cpp/ggml.c
|
|
||||||
|
|
||||||
import ffmpeg
|
import ffmpeg
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
Loading…
Reference in New Issue
Block a user