-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from ReadAlongs/py312
Python 3.12 support
- Loading branch information
Showing
12 changed files
with
118 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
$allocateUTF8 | ||
$stringToNewUTF8 | ||
$ccall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
find_package(PythonExtensions REQUIRED) | ||
find_package(Python COMPONENTS Interpreter Development) | ||
find_package(Cython) | ||
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED) | ||
find_program(CYTHON "cython") | ||
|
||
set_property(TARGET soundswallower PROPERTY POSITION_INDEPENDENT_CODE on) | ||
|
||
add_cython_target(_soundswallower _soundswallower.pyx) | ||
add_library(_soundswallower MODULE ${_soundswallower}) | ||
target_link_libraries(_soundswallower soundswallower) | ||
add_custom_command( | ||
OUTPUT _soundswallower.c | ||
DEPENDS _soundswallower.pyx | ||
VERBATIM | ||
COMMAND "${CYTHON}" "${CMAKE_CURRENT_SOURCE_DIR}/_soundswallower.pyx" | ||
--output-file "${CMAKE_CURRENT_BINARY_DIR}/_soundswallower.c") | ||
|
||
python_add_library(_soundswallower MODULE | ||
"${CMAKE_CURRENT_BINARY_DIR}/_soundswallower.c" WITH_SOABI) | ||
target_link_libraries(_soundswallower PRIVATE soundswallower) | ||
target_include_directories( | ||
_soundswallower PRIVATE ${PYTHON_INCLUDE_DIR} | ||
_soundswallower PRIVATE ${PROJECT_SOURCE_DIR}/src | ||
_soundswallower PRIVATE ${PROJECT_SOURCE_DIR}/include | ||
_soundswallower PRIVATE ${CMAKE_BINARY_DIR} # for config.h | ||
) | ||
python_extension_module(_soundswallower) | ||
install(TARGETS _soundswallower LIBRARY DESTINATION py/soundswallower) | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/model DESTINATION py/soundswallower) | ||
install(TARGETS _soundswallower LIBRARY DESTINATION soundswallower) | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/model DESTINATION soundswallower) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,72 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=45,<64", | ||
"wheel", | ||
"scikit-build~=0.15", | ||
"cmake", | ||
"Cython", | ||
"ninja" | ||
"scikit-build-core", | ||
"Cython" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
name = "soundswallower" | ||
version = "0.6.1" | ||
description = "An even smaller speech recognizer" | ||
readme = "README.md" | ||
authors = [ | ||
{name = "David Huggins-Daines", email = "[email protected]"} | ||
] | ||
keywords = ["asr", "speech"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Programming Language :: C", | ||
"Programming Language :: Cython", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Multimedia :: Sound/Audio :: Speech", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/ReadAlongs/SoundSwallower" | ||
Documentation = "https://soundswallower.readthedocs.io/" | ||
Repository = "https://github.com/ReadAlongs/SoundSwallower.git" | ||
Issues = "https://github.com/ReadAlongs/SoundSwallower/issues" | ||
|
||
[project.scripts] | ||
soundswallower = "soundswallower.cli:main" | ||
|
||
[tool.cibuildwheel] | ||
# Build the versions found in Ubuntu LTS, the stable PyPy, Anaconda on Windows | ||
# ...and some other versions we want for Windows | ||
# Build a reduced selection of binaries as there are tons of them | ||
build = [ | ||
"pp38*", | ||
"cp36-manylinux_*", | ||
"cp38-manylinux_*", | ||
"cp37-win*", | ||
"cp38-win*", | ||
"cp39-win*", | ||
"cp310-*" | ||
"pp310*", | ||
"cp38-*", | ||
"cp310-*", | ||
"cp311-*", | ||
"cp312-*", | ||
] | ||
# Build only universal wheels for Mac where possible, and skip 32-bit | ||
# builds to avoid building a gigabyte of stuff all the time | ||
skip = [ | ||
"cp*-macosx_x86_64", | ||
"cp*-macosx_arm64", | ||
"*_i686", | ||
"*-win32", | ||
] | ||
# PyPy 3.8 will choke on CPython 3.8 build leftovers... | ||
before-build = "rm -rf _skbuild" | ||
# PyPy builds are broken on Windows, and skip 32-bit and musl | ||
skip = ["*musl*", "*_i686", "*-win32", "pp*win*"] | ||
|
||
[tool.cibuildwheel.macos] | ||
archs = ["x86_64", "universal2", "arm64"] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.flake8] | ||
extend-ignore = "E203" | ||
max-line-length = "88" | ||
|
||
[tool.scikit-build] | ||
cmake.verbose = true | ||
logging.level = "INFO" | ||
wheel.packages = ["py/soundswallower"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Hash with chaining representation of the hash table | ||
|key:-bla|len:4|val=8|->NULL | ||
|key:-hmmdump|len:8|val=1|->|key:-subvq|len:6|val=7|->|key:-outlatdir|len:10|val=3|->NULL | ||
|key:-svq4svq|len:8|val=2|->|key:-lminmemory|len:11|val=6|->NULL | ||
|key:-beam|len:5|val=5|->NULL | ||
|key:-bla|len:4|val=0x8|->NULL | ||
|key:-hmmdump|len:8|val=0x1|->|key:-subvq|len:6|val=0x7|->|key:-outlatdir|len:10|val=0x3|->NULL | ||
|key:-svq4svq|len:8|val=0x2|->|key:-lminmemory|len:11|val=0x6|->NULL | ||
|key:-beam|len:5|val=0x5|->NULL | ||
The total number of keys =7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Hash with chaining representation of the hash table | ||
|key:-bla|len:4|val=8|->NULL | ||
|key:-hmmdump|len:8|val=1|->|key:-outlatdir|len:10|val=3|->NULL | ||
|key:-svq4svq|len:8|val=2|->|key:-lminmemory|len:11|val=6|->NULL | ||
|key:-lm|len:3|val=4|->NULL | ||
|key:-beam|len:5|val=5|->NULL | ||
|key:-bla|len:4|val=0x8|->NULL | ||
|key:-hmmdump|len:8|val=0x1|->|key:-outlatdir|len:10|val=0x3|->NULL | ||
|key:-svq4svq|len:8|val=0x2|->|key:-lminmemory|len:11|val=0x6|->NULL | ||
|key:-lm|len:3|val=0x4|->NULL | ||
|key:-beam|len:5|val=0x5|->NULL | ||
The total number of keys =7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Hash with chaining representation of the hash table | ||
|key:-bla|len:4|val=8|->NULL | ||
|key:-hmmdump|len:8|val=1|->|key:-subvq|len:6|val=7|->|key:-outlatdir|len:10|val=3|->NULL | ||
|key:-lminmemory|len:11|val=6|->NULL | ||
|key:-lm|len:3|val=4|->NULL | ||
|key:-beam|len:5|val=5|->NULL | ||
|key:-bla|len:4|val=0x8|->NULL | ||
|key:-hmmdump|len:8|val=0x1|->|key:-subvq|len:6|val=0x7|->|key:-outlatdir|len:10|val=0x3|->NULL | ||
|key:-lminmemory|len:11|val=0x6|->NULL | ||
|key:-lm|len:3|val=0x4|->NULL | ||
|key:-beam|len:5|val=0x5|->NULL | ||
The total number of keys =7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Hash with chaining representation of the hash table | ||
|key:-bla|len:4|val=8|->NULL | ||
|key:-subvq|len:6|val=7|->|key:-outlatdir|len:10|val=3|->NULL | ||
|key:-svq4svq|len:8|val=2|->|key:-lminmemory|len:11|val=6|->NULL | ||
|key:-lm|len:3|val=4|->NULL | ||
|key:-beam|len:5|val=5|->NULL | ||
|key:-bla|len:4|val=0x8|->NULL | ||
|key:-subvq|len:6|val=0x7|->|key:-outlatdir|len:10|val=0x3|->NULL | ||
|key:-svq4svq|len:8|val=0x2|->|key:-lminmemory|len:11|val=0x6|->NULL | ||
|key:-lm|len:3|val=0x4|->NULL | ||
|key:-beam|len:5|val=0x5|->NULL | ||
The total number of keys =7 |