Skip to content

Commit

Permalink
Update project name and remove unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
rossarmstrong committed Nov 19, 2023
1 parent 484d22a commit 50daea3
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 7 deletions.
37 changes: 33 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -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
)
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 50daea3

Please sign in to comment.