Skip to content

Commit

Permalink
Python project configs
Browse files Browse the repository at this point in the history
  • Loading branch information
oir committed Nov 23, 2023
1 parent d89cb4a commit 7aefdc6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('meanwhile', 'cpp', default_options : ['cpp_std=c++20', 'warning_level=3'])
project('meanwhile', 'cpp', default_options : ['cpp_std=c++20', 'warning_level=3', 'cpp_compiler=g++-11'])

incdir = include_directories(['./', './extern/'])

Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[build-system]
build-backend = 'mesonpy'
requires = ['meson-python']

[project]
name = 'mewpy'
version = '0.0.1'
description = 'Our first Python project, using meson-python!'
readme = 'README.md'
requires-python = '>=3.9'
license = {file = 'LICENSE'}
authors = [
{name = 'Bowsette Koopa', email = '[email protected]'},
]
7 changes: 6 additions & 1 deletion python/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ if py.found()
'meanwhile-py.cpp',
]

py.install_sources(
subdir: '../meanwhile',
pure: false,
)

tgt = py.extension_module('mewpy',
sources : sources,
include_directories : incdir,
dependencies : deps + [pybind11])
dependencies : deps + [pybind11],
install : true)

message('Python target name: ' + tgt.name())
alias_target('python', tgt)
Expand Down

0 comments on commit 7aefdc6

Please sign in to comment.