Skip to content

Commit

Permalink
Use meson.build. (#26)
Browse files Browse the repository at this point in the history
* Working meson.build.

* Maybe get tests working on github.

* Romove editable mode in pipeline.

* Run pipeline on different machines.

* Do not update pip.

* Runner is broken?
  • Loading branch information
JonasBreuling authored Jul 30, 2024
1 parent 009564d commit acdd9b8
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 22 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name: Build and test

on: [push]
# on:
# pull_request:
# branches:
# - main
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build project
runs-on: ubuntu-latest
# runs-on: python:latest

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4

Expand All @@ -20,11 +27,8 @@ jobs:
python-version: "3.8"
cache: "pip" # caching pip dependencies

- name: Update pip
run: pip install --upgrade pip

- name: Install dependencies and scipy_dae
run: pip install -e .
run: pip install .

- name: Install test dependencies
run: pip install pytest pytest-cov
Expand Down
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project(
'scipy_dae',
version: '0.0.4',
meson_version: '>= 1.1.0',
)

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

subdir('scipy_dae')
33 changes: 24 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages]
find = {} # Scanning implicit namespaces is active by default
build-backend = "mesonpy"
requires = ["meson-python>=0.15.0"]

[project]
name = "scipy_dae"
Expand All @@ -20,9 +17,24 @@ dependencies = [
"matplotlib>=3.4.3",
]
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]

[project.optional-dependencies]
Expand All @@ -32,5 +44,8 @@ dev = [
]

[project.urls]
Homepage = "https://github.com/JonasBreuling/scipy_dae"
Issues = "https://github.com/JonasBreuling/scipy_dae/issues"
homepage = "https://github.com/JonasBreuling/scipy_dae"
documentaton = "https://github.com/JonasBreuling/scipy_dae"
source = "https://github.com/JonasBreuling/scipy_dae"
download = "https://github.com/JonasBreuling/scipy_dae/releases"
tracker = "https://github.com/JonasBreuling/scipy_dae/issues"
8 changes: 6 additions & 2 deletions scipy_dae/integrate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
from ._dae import solve_dae, consistent_initial_conditions
from ._dae import BDFDAE, RadauDAE
from ._dae import (
solve_dae,
consistent_initial_conditions,
BDFDAE,
RadauDAE,
)
12 changes: 12 additions & 0 deletions scipy_dae/integrate/_dae/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
py3.install_sources([
'__init__.py',
'base.py',
'bdf.py',
'common.py',
'dae.py',
'radau.py',
],
subdir: 'scipy_dae/integrate/_dae'
)

subdir('tests')
Empty file.
8 changes: 8 additions & 0 deletions scipy_dae/integrate/_dae/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
py3.install_sources([
'__init__.py',
'test_consistent_initial_conditions.py',
'test_dae.py',
],
subdir: 'scipy_dae/integrate/_dae/tests',
install_tag: 'tests'
)
7 changes: 7 additions & 0 deletions scipy_dae/integrate/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
py3.install_sources([
'__init__.py',
],
subdir: 'scipy_dae/integrate'
)

subdir('_dae')
10 changes: 10 additions & 0 deletions scipy_dae/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
python_sources = [
'__init__.py',
]

py3.install_sources(
python_sources,
subdir: 'scipy_dae'
)

subdir('integrate')

0 comments on commit acdd9b8

Please sign in to comment.