Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions MANIFEST.in

This file was deleted.

22 changes: 22 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
project('pyfuse3', 'c', 'cython',
meson_version: '>= 1.1.0',
version: run_command(
[find_program('python3'), '-m', 'setuptools_scm'],
check: true
).stdout().strip(),
default_options: [
'warning_level=2',
]
)

# Import Python module
py = import('python').find_installation(pure: false)

# Check for required dependencies via pkg-config
fuse3_dep = dependency('fuse3', version: '>=3.2.0')

# Platform detection
host_system = host_machine.system()

# Process subdirectories
subdir('src')
21 changes: 10 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[build-system]
requires = ["setuptools>=78.1.1", "setuptools_scm>=8.0", "Cython"]
build-backend = "build_backend"
backend-path = ["util"]
requires = [
"meson-python>=0.16.0",
"meson>=1.1.0",
"setuptools_scm>=8.0",
"Cython>=3.0",
]
build-backend = "mesonpy"

[project]
name = "pyfuse3"
Expand Down Expand Up @@ -40,12 +44,7 @@ dev = [

[tool.setuptools_scm]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
pyfuse3 = ["py.typed"]
# Meson-python configuration
[tool.meson-python.args]
# Add any meson-specific build arguments if needed

48 changes: 48 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Define the pyfuse3 Cython extension module

inc_dirs = include_directories('../Include', 'pyfuse3')

compile_args = [
'-DFUSE_USE_VERSION=32',
'-Wall',
'-Wextra',
'-Wconversion',
'-Wsign-compare',
'-Wno-unused-function',
'-Wno-implicit-fallthrough',
'-Wno-unused-parameter',
]

link_args = ['-lpthread']
sources = ['pyfuse3/__init__.pyx']

# Platform-specific configuration
if host_system == 'darwin'
sources += ['pyfuse3/darwin_compat.c']
elif host_system == 'linux' or host_system == 'gnu'
link_args += ['-lrt']
endif

pyfuse3_ext = py.extension_module(
'__init__',
sources: sources,
include_directories: inc_dirs,
c_args: compile_args,
link_args: link_args,
dependencies: fuse3_dep,
install: true,
subdir: 'pyfuse3',
override_options: ['cython_language=c'],
cython_args: ['-I', meson.project_source_root() / 'Include'],
)

# Install pure Python modules
py.install_sources(
[
'pyfuse3/__init__.pyi',
'pyfuse3/_pyfuse3.py',
'pyfuse3/asyncio.py',
'pyfuse3/py.typed',
],
preserve_path: true,
)
148 changes: 0 additions & 148 deletions util/build_backend.py

This file was deleted.

Loading