diff --git a/meson.build b/meson.build index c485c95..03012e0 100644 --- a/meson.build +++ b/meson.build @@ -1,20 +1,49 @@ project( - 'werpy_test_v4', + 'werpy_test_v5', 'c', version : '0.0.1', default_options : ['warning_level=3']) -py = import('python').find_installation(pure: false) +# Find Python +py = import('python').find_installation('python3') +# Find Cython cython = find_program('cython') -pyx_files = files('werpy_test_v4/metrics.pyx') + +# Cython files +pyx_files = files('werpy_test_v5/metrics.pyx') + +# Compile Cython files c_files = custom_target('cythonize', output : 'metrics.c', input : pyx_files, command : [cython, '-3', '--fast-fail', '-o', '@OUTPUT@', '@INPUT@']) +# Source files +#sources = files( +# 'werpy_test_v5/metrics.c' +#) + +# Add the compiled Cython files to the sources +#sources += c_files + +# Add NumPy include directories +#numpy_includes = include_directories(py.get_install_dir() / 'numpy/core/include') +#numpy_includes = include_directories('C:/Users/rossa/AppData/Local/Programs/Python/Python311/Lib/site-packages/numpy/core/include') +# Find NumPy +#numpy_dep = dependency('python3-numpy', method : 'pkg-config') +# Find NumPy include directories +numpy_includes = run_command(py, '-c', 'import numpy; print(numpy.get_include())').stdout().strip() + + + +# Cython module py.extension_module( - 'werpy_test_v4', + 'werpy_test_v5', +# sources, c_files, +# dependencies : numpy_dep, +# include_directories : numpy_includes, + include_directories : include_directories(numpy_includes), install : true ) diff --git a/pyproject.toml b/pyproject.toml index 1579631..0c221f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,9 @@ [build-system] build-backend = 'mesonpy' -requires = ['meson-python', 'wheel', 'Cython'] -#requires = ['meson-python', 'wheel', 'Cython', 'numpy'] +requires = ['meson-python', 'wheel', 'Cython', 'numpy'] [project] -name = 'werpy_test_v4' +name = 'werpy_test_v5' version = '0.0.1' description = 'A powerful yet lightweight Python package to calculate and analyze the Word Error Rate (WER).' readme = 'README.md' diff --git a/werpy_test_v4/__init__.py b/werpy_test_v5/__init__.py similarity index 100% rename from werpy_test_v4/__init__.py rename to werpy_test_v5/__init__.py diff --git a/werpy_test_v4/errorhandler.py b/werpy_test_v5/errorhandler.py similarity index 100% rename from werpy_test_v4/errorhandler.py rename to werpy_test_v5/errorhandler.py diff --git a/werpy_test_v4/metrics.pyx b/werpy_test_v5/metrics.pyx similarity index 100% rename from werpy_test_v4/metrics.pyx rename to werpy_test_v5/metrics.pyx diff --git a/werpy_test_v4/normalize.py b/werpy_test_v5/normalize.py similarity index 100% rename from werpy_test_v4/normalize.py rename to werpy_test_v5/normalize.py diff --git a/werpy_test_v4/summary.py b/werpy_test_v5/summary.py similarity index 100% rename from werpy_test_v4/summary.py rename to werpy_test_v5/summary.py diff --git a/werpy_test_v4/summaryp.py b/werpy_test_v5/summaryp.py similarity index 100% rename from werpy_test_v4/summaryp.py rename to werpy_test_v5/summaryp.py diff --git a/werpy_test_v4/wer.py b/werpy_test_v5/wer.py similarity index 100% rename from werpy_test_v4/wer.py rename to werpy_test_v5/wer.py diff --git a/werpy_test_v4/werp.py b/werpy_test_v5/werp.py similarity index 100% rename from werpy_test_v4/werp.py rename to werpy_test_v5/werp.py diff --git a/werpy_test_v4/werps.py b/werpy_test_v5/werps.py similarity index 100% rename from werpy_test_v4/werps.py rename to werpy_test_v5/werps.py diff --git a/werpy_test_v4/wers.py b/werpy_test_v5/wers.py similarity index 100% rename from werpy_test_v4/wers.py rename to werpy_test_v5/wers.py