Skip to content

Commit 4dfe490

Browse files
committed
adding CI changes
1 parent 220e0ae commit 4dfe490

31 files changed

+249
-976
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,21 @@ jobs:
5757
working-directory: unytdtype
5858
run: |
5959
pytest -vvv --color=yes
60+
- name: Install quaddtype dependencies
61+
run: |
62+
sudo apt-get update
63+
sudo apt-get install -y libmpfr-dev libssl-dev libfftw3-dev
64+
- name: Install SLEEF
65+
run: |
66+
git clone https://github.com/shibatch/sleef.git
67+
cd sleef
68+
cmake -S . -B build/
69+
cmake --build build/ --clean-first -j
70+
sudo cmake --install build/ --prefix /usr
6071
- name: Install quaddtype
6172
working-directory: quaddtype
6273
run: |
63-
python -m build --no-isolation --wheel -Cbuilddir=build
64-
find ./dist/*.whl | xargs python -m pip install
74+
python -m pip install . -v --no-build-isolation -Cbuilddir=build -C'compile-args=-v' -Csetup-args="-Dbuildtype=debug"
6575
- name: Run quaddtype tests
6676
working-directory: quaddtype
6777
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ compile_commands.json
133133

134134
.ruff-cache/
135135
.asv
136+
.vscode/

quaddtype/.flake8

Lines changed: 0 additions & 6 deletions
This file was deleted.

quaddtype/README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +0,0 @@
1-
# quaddtype
2-
3-
Quad (128-bit) float dtype for numpy
4-
5-
## Installation
6-
7-
To install, make sure you have `numpy` nightly installed. Then build without
8-
isolation so that the `quaddtype` can link against the experimental dtype API
9-
headers, which aren't in the latest releases of `numpy`:
10-
11-
```bash
12-
pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
13-
pip install . --no-build-isolation
14-
```
15-
16-
Developed with Python 3.11, but 3.9 and 3.10 will probably also work.

quaddtype/meson.build

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
1-
project(
2-
'quaddtype',
3-
'c',
4-
)
1+
project('quaddtype2', 'c', 'cpp', default_options : ['cpp_std=c++17'])
52

63
py_mod = import('python')
74
py = py_mod.find_installation()
85

6+
c = meson.get_compiler('c')
7+
8+
sleef_dep = c.find_library('sleef')
9+
sleefquad_dep = c.find_library('sleefquad')
10+
911
incdir_numpy = run_command(py,
1012
[
1113
'-c',
12-
'import numpy; print(numpy.get_include())'
14+
'import numpy; import os; print(os.path.relpath(numpy.get_include()))'
1315
],
1416
check: true
1517
).stdout().strip()
1618

1719
includes = include_directories(
18-
[
19-
incdir_numpy,
20-
'quaddtype/src'
21-
]
20+
[
21+
incdir_numpy,
22+
'quaddtype/src',
23+
]
2224
)
2325

2426
srcs = [
25-
'quaddtype/src/umath.c',
26-
'quaddtype/src/casts.c',
27-
'quaddtype/src/dtype.c',
28-
'quaddtype/src/quaddtype_main.c',
27+
'quaddtype/src/casts.h',
28+
'quaddtype/src/casts.cpp',
29+
'quaddtype/src/scalar.h',
30+
'quaddtype/src/scalar.c',
31+
'quaddtype/src/dtype.h',
32+
'quaddtype/src/dtype.c',
33+
'quaddtype/src/quaddtype_main.c'
2934
]
3035

3136
py.install_sources(
32-
[
33-
'quaddtype/__init__.py',
34-
'quaddtype/quadscalar.py'
35-
],
36-
subdir: 'quaddtype',
37-
pure: false
37+
[
38+
'quaddtype/__init__.py',
39+
],
40+
subdir: 'quaddtype',
41+
pure: false
3842
)
3943

40-
py.extension_module(
41-
'_quaddtype_main',
42-
srcs,
43-
c_args: ['-g', '-O0'],
44-
install: true,
45-
subdir: 'quaddtype',
46-
include_directories: includes
47-
)
44+
py.extension_module('_quaddtype_main',
45+
srcs,
46+
c_args: ['-g', '-O0', '-lsleef', '-lsleefquad'],
47+
dependencies: [sleef_dep, sleefquad_dep],
48+
install: true,
49+
subdir: 'quaddtype',
50+
include_directories: includes
51+
)

quaddtype/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = [
3-
"meson>=0.63.0",
3+
"meson>=1.3.2",
44
"meson-python",
55
"patchelf",
66
"wheel",
@@ -13,7 +13,7 @@ name = "quaddtype"
1313
description = "Quad (128-bit) float dtype for numpy"
1414
version = "0.0.1"
1515
readme = 'README.md'
16-
author = "Peyton Murray"
16+
author = "Swayam Singh"
1717
requires-python = ">=3.9.0"
1818
dependencies = [
1919
"numpy"

quaddtype/quaddtype/__init__.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
# Scalar quantity must be defined _before_ the dtype, so don't isort it.
2-
# During initialization of _quaddtype_main, QuadScalar is imported from this
3-
# (partially initialized)
4-
# module, and therefore has to be defined first.
5-
from .quadscalar import QuadScalar # isort: skip
6-
from ._quaddtype_main import QuadDType
7-
8-
__all__ = ["QuadScalar", "QuadDType"]
1+
from ._quaddtype_main import QuadPrecDType, QuadPrecision

quaddtype/quaddtype/quadscalar.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

quaddtype/quaddtype/src/casts.c

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)