Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Oct 30, 2024
1 parent b696583 commit 8233936
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
3 changes: 0 additions & 3 deletions example/cysignals_example.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# distutils: language = c++
# cython: language_level = 3

from cysignals.signals cimport sig_check
from cysignals.memory cimport check_allocarray

Expand Down
25 changes: 25 additions & 0 deletions example/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project('cysignals_example', 'cython', 'cpp')

py = import('python').find_installation()

inc_cysignals = run_command(
py,
[
'-c',
'''
import cysignals
print(cysignals.__file__.replace('__init__.py', ''))
'''.strip(),
],
check: true,
).stdout().strip()
cysignals = declare_dependency(include_directories: inc_cysignals)


py.extension_module('cysignals_example',
sources: ['cysignals_example.pyx'],
install: true,
dependencies: [cysignals],
override_options: ['cython_language=cpp'],
subdir: 'cysignals_example'
)
8 changes: 6 additions & 2 deletions example/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ['setuptools', 'Cython>=0.28', 'cysignals']
build-backend = "setuptools.build_meta"
requires = ["meson-python", "cython>=0.28"]
build-backend = "mesonpy"

[project]
name = "cysignals-example"
version = "0.1.0"
11 changes: 0 additions & 11 deletions example/setup.py

This file was deleted.

0 comments on commit 8233936

Please sign in to comment.