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.
@@ -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
@@ -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/
@@ -0,0 +1,2 @@
1
+ include src/mathpf/*.pyx
2
+ include src/mathpf/*.pxd
mathpf-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: mathpf
3
+ Version: 0.3.0
4
+ Summary: Numerically stable math utility functions for quantitative finance
5
+ Project-URL: Homepage, https://github.com/PyFENG/MathPF
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: numpy>=1.21
@@ -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
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
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
+ )
@@ -0,0 +1,3 @@
1
+ from .avg_funcs import logrel, powrel
2
+
3
+ __all__ = ["logrel", "powrel"]