mathpf 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mathpf-0.3.0/.github/workflows/build_wheels.yml +63 -0
- mathpf-0.3.0/.gitignore +24 -0
- mathpf-0.3.0/MANIFEST.in +2 -0
- mathpf-0.3.0/PKG-INFO +7 -0
- mathpf-0.3.0/pyproject.toml +26 -0
- mathpf-0.3.0/setup.cfg +4 -0
- mathpf-0.3.0/setup.py +25 -0
- mathpf-0.3.0/src/mathpf/__init__.py +3 -0
- mathpf-0.3.0/src/mathpf/avg_funcs.c +31462 -0
- mathpf-0.3.0/src/mathpf/avg_funcs.pxd +5 -0
- mathpf-0.3.0/src/mathpf/avg_funcs.pyx +103 -0
- mathpf-0.3.0/src/mathpf.egg-info/PKG-INFO +7 -0
- mathpf-0.3.0/src/mathpf.egg-info/SOURCES.txt +14 -0
- mathpf-0.3.0/src/mathpf.egg-info/dependency_links.txt +1 -0
- mathpf-0.3.0/src/mathpf.egg-info/requires.txt +1 -0
- mathpf-0.3.0/src/mathpf.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Build and publish wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch: # allow manual trigger without a tag
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build_wheels:
|
|
11
|
+
name: Build wheels — ${{ matrix.os }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, windows-latest, macos-14]
|
|
16
|
+
# macos-14 = arm64 (Apple Silicon); Intel users run via Rosetta 2
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Build wheels
|
|
22
|
+
uses: pypa/cibuildwheel@v2.23
|
|
23
|
+
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: wheels-${{ matrix.os }}
|
|
27
|
+
path: ./wheelhouse/*.whl
|
|
28
|
+
|
|
29
|
+
build_sdist:
|
|
30
|
+
name: Build source distribution
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Build sdist
|
|
36
|
+
run: pipx run build --sdist
|
|
37
|
+
|
|
38
|
+
- uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: sdist
|
|
41
|
+
path: dist/*.tar.gz
|
|
42
|
+
|
|
43
|
+
publish:
|
|
44
|
+
name: Publish to PyPI
|
|
45
|
+
needs: [build_wheels, build_sdist]
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
48
|
+
environment: pypi # requires PyPI trusted publisher setup
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write # OIDC — no API token needed
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/download-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
pattern: wheels-*
|
|
55
|
+
merge-multiple: true
|
|
56
|
+
path: dist/
|
|
57
|
+
|
|
58
|
+
- uses: actions/download-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
name: sdist
|
|
61
|
+
path: dist/
|
|
62
|
+
|
|
63
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
mathpf-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Cython generated C files
|
|
2
|
+
mathpf/*.c
|
|
3
|
+
|
|
4
|
+
# Compiled extensions
|
|
5
|
+
*.so
|
|
6
|
+
*.pyd
|
|
7
|
+
|
|
8
|
+
# Build artifacts
|
|
9
|
+
build/
|
|
10
|
+
dist/
|
|
11
|
+
wheelhouse/
|
|
12
|
+
*.egg-info/
|
|
13
|
+
|
|
14
|
+
# Python cache
|
|
15
|
+
__pycache__/
|
|
16
|
+
*.pyc
|
|
17
|
+
*.pyo
|
|
18
|
+
|
|
19
|
+
# Jupyter
|
|
20
|
+
.ipynb_checkpoints/
|
|
21
|
+
|
|
22
|
+
# IDEs
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
mathpf-0.3.0/MANIFEST.in
ADDED
mathpf-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "setuptools-scm>=8", "Cython>=3.0", "numpy>=1.21"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mathpf"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Numerically stable math utility functions for quantitative finance"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = ["numpy>=1.21"]
|
|
11
|
+
|
|
12
|
+
[project.urls]
|
|
13
|
+
Homepage = "https://github.com/PyFENG/MathPF"
|
|
14
|
+
|
|
15
|
+
[tool.setuptools_scm]
|
|
16
|
+
|
|
17
|
+
[tool.cibuildwheel]
|
|
18
|
+
build = "cp310-* cp311-* cp312-* cp313-*"
|
|
19
|
+
skip = "*-musllinux*"
|
|
20
|
+
|
|
21
|
+
[tool.cibuildwheel.linux]
|
|
22
|
+
archs = ["x86_64"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[tool.cibuildwheel.windows]
|
|
26
|
+
archs = ["AMD64"]
|
mathpf-0.3.0/setup.cfg
ADDED
mathpf-0.3.0/setup.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from setuptools import setup, Extension, find_packages
|
|
2
|
+
from Cython.Build import cythonize
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
extensions = [
|
|
6
|
+
Extension(
|
|
7
|
+
name="mathpf.avg_funcs",
|
|
8
|
+
sources=["src/mathpf/avg_funcs.pyx"],
|
|
9
|
+
include_dirs=[np.get_include()],
|
|
10
|
+
)
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
setup(
|
|
14
|
+
packages=find_packages(where="src"),
|
|
15
|
+
package_dir={"": "src"},
|
|
16
|
+
ext_modules=cythonize(
|
|
17
|
+
extensions,
|
|
18
|
+
language_level=3,
|
|
19
|
+
compiler_directives={
|
|
20
|
+
"boundscheck": False,
|
|
21
|
+
"wraparound": False,
|
|
22
|
+
"cdivision": True,
|
|
23
|
+
},
|
|
24
|
+
)
|
|
25
|
+
)
|