f2py-cmake 0.1.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.
- f2py_cmake-0.1.0/.git_archival.txt +4 -0
- f2py_cmake-0.1.0/.gitattributes +1 -0
- f2py_cmake-0.1.0/.github/CONTRIBUTING.md +89 -0
- f2py_cmake-0.1.0/.github/dependabot.yml +11 -0
- f2py_cmake-0.1.0/.github/release.yml +5 -0
- f2py_cmake-0.1.0/.github/workflows/cd.yml +56 -0
- f2py_cmake-0.1.0/.github/workflows/ci.yml +74 -0
- f2py_cmake-0.1.0/.gitignore +158 -0
- f2py_cmake-0.1.0/.pre-commit-config.yaml +89 -0
- f2py_cmake-0.1.0/.readthedocs.yaml +17 -0
- f2py_cmake-0.1.0/LICENSE +202 -0
- f2py_cmake-0.1.0/PKG-INFO +343 -0
- f2py_cmake-0.1.0/README.md +102 -0
- f2py_cmake-0.1.0/docs/conf.py +45 -0
- f2py_cmake-0.1.0/docs/index.md +17 -0
- f2py_cmake-0.1.0/noxfile.py +114 -0
- f2py_cmake-0.1.0/pyproject.toml +163 -0
- f2py_cmake-0.1.0/src/f2py_cmake/__init__.py +11 -0
- f2py_cmake-0.1.0/src/f2py_cmake/__main__.py +34 -0
- f2py_cmake-0.1.0/src/f2py_cmake/_version.py +16 -0
- f2py_cmake-0.1.0/src/f2py_cmake/_version.pyi +4 -0
- f2py_cmake-0.1.0/src/f2py_cmake/cmake/UseF2Py.cmake +125 -0
- f2py_cmake-0.1.0/src/f2py_cmake/cmake/__init__.py +0 -0
- f2py_cmake-0.1.0/src/f2py_cmake/py.typed +0 -0
- f2py_cmake-0.1.0/src/f2py_cmake/vendor.py +30 -0
- f2py_cmake-0.1.0/tests/conftest.py +38 -0
- f2py_cmake-0.1.0/tests/packages/f77/CMakeLists.txt +18 -0
- f2py_cmake-0.1.0/tests/packages/f77/fib1.f +18 -0
- f2py_cmake-0.1.0/tests/packages/f77/pyproject.toml +7 -0
- f2py_cmake-0.1.0/tests/test_package.py +32 -0
- f2py_cmake-0.1.0/tests/test_vendorize.py +21 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
|
|
2
|
+
description of best practices for developing scientific packages.
|
|
3
|
+
|
|
4
|
+
[spc-dev-intro]: https://learn.scientific-python.org/development/
|
|
5
|
+
|
|
6
|
+
# Quick development
|
|
7
|
+
|
|
8
|
+
The fastest way to start with development is to use nox. If you don't have nox,
|
|
9
|
+
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
|
|
10
|
+
If you don't have pipx (pip for applications), then you can install with
|
|
11
|
+
`pip install pipx` (the only case were installing an application with regular
|
|
12
|
+
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
|
|
13
|
+
`brew install pipx nox`.
|
|
14
|
+
|
|
15
|
+
To use, run `nox`. This will lint and test using every installed version of
|
|
16
|
+
Python on your system, skipping ones that are not installed. You can also run
|
|
17
|
+
specific jobs:
|
|
18
|
+
|
|
19
|
+
```console
|
|
20
|
+
$ nox -s lint # Lint only
|
|
21
|
+
$ nox -s tests # Python tests
|
|
22
|
+
$ nox -s docs -- --serve # Build and serve the docs
|
|
23
|
+
$ nox -s build # Make an SDist and wheel
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Nox handles everything for you, including setting up an temporary virtual
|
|
27
|
+
environment for each run.
|
|
28
|
+
|
|
29
|
+
# Setting up a development environment manually
|
|
30
|
+
|
|
31
|
+
You can set up a development environment by running:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 -m venv .venv
|
|
35
|
+
source ./.venv/bin/activate
|
|
36
|
+
pip install -v -e .[dev]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If you have the
|
|
40
|
+
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
|
|
41
|
+
can instead do:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
py -m venv .venv
|
|
45
|
+
py -m install -v -e .[dev]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
# Pre-commit
|
|
49
|
+
|
|
50
|
+
You should prepare pre-commit, which will help you by checking that commits pass
|
|
51
|
+
required checks:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install pre-commit # or brew install pre-commit on macOS
|
|
55
|
+
pre-commit install # Will install a pre-commit hook into the git repo
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You can also/alternatively run `pre-commit run` (changes only) or
|
|
59
|
+
`pre-commit run --all-files` to check even without installing the hook.
|
|
60
|
+
|
|
61
|
+
# Testing
|
|
62
|
+
|
|
63
|
+
Use pytest to run the unit checks:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pytest
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
# Coverage
|
|
70
|
+
|
|
71
|
+
Use pytest-cov to generate coverage reports:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pytest --cov=f2py-cmake
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
# Building docs
|
|
78
|
+
|
|
79
|
+
You can build the docs using:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
nox -s docs
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
You can see a preview with:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
nox -s docs -- --serve
|
|
89
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
release:
|
|
10
|
+
types:
|
|
11
|
+
- published
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
# Many color libraries just need this to be set to any value, but at least
|
|
19
|
+
# one distinguishes color depth, where "3" -> "256-bit color".
|
|
20
|
+
FORCE_COLOR: 3
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
dist:
|
|
24
|
+
name: Distribution build
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- uses: hynek/build-and-inspect-python-package@v2
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
needs: [dist]
|
|
36
|
+
name: Publish to PyPI
|
|
37
|
+
environment: pypi
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write
|
|
40
|
+
attestations: write
|
|
41
|
+
contents: read
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/download-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: Packages
|
|
49
|
+
path: dist
|
|
50
|
+
|
|
51
|
+
- name: Generate artifact attestation for sdist and wheel
|
|
52
|
+
uses: actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
|
|
53
|
+
with:
|
|
54
|
+
subject-path: "dist/f2py*"
|
|
55
|
+
|
|
56
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
# Many color libraries just need this to be set to any value, but at least
|
|
16
|
+
# one distinguishes color depth, where "3" -> "256-bit color".
|
|
17
|
+
FORCE_COLOR: 3
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
pre-commit:
|
|
21
|
+
name: Format
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.x"
|
|
30
|
+
- uses: yezz123/setup-uv@v4
|
|
31
|
+
- uses: pre-commit/action@v3.0.1
|
|
32
|
+
with:
|
|
33
|
+
extra_args: --hook-stage manual --all-files
|
|
34
|
+
- name: Run PyLint
|
|
35
|
+
run: pipx run nox -s pylint -- --output-format=github
|
|
36
|
+
|
|
37
|
+
checks:
|
|
38
|
+
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
|
|
39
|
+
runs-on: ${{ matrix.runs-on }}
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
python-version: ["3.8", "3.12"]
|
|
44
|
+
runs-on: [ubuntu-latest, macos-14]
|
|
45
|
+
|
|
46
|
+
include:
|
|
47
|
+
- python-version: "pypy-3.9"
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
allow-prereleases: true
|
|
59
|
+
|
|
60
|
+
- uses: yezz123/setup-uv@v4
|
|
61
|
+
|
|
62
|
+
- name: Install gfortran
|
|
63
|
+
if: runner.os == 'macOS'
|
|
64
|
+
run: |
|
|
65
|
+
echo "gfortran: $(which gfortran)"
|
|
66
|
+
brew reinstall gfortran
|
|
67
|
+
echo "gfortran: $(which gfortran)"
|
|
68
|
+
|
|
69
|
+
- name: Install package
|
|
70
|
+
run: uv pip install --system -e .[test]
|
|
71
|
+
|
|
72
|
+
- name: Test package
|
|
73
|
+
run: >-
|
|
74
|
+
python -m pytest --durations=20
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
98
|
+
__pypackages__/
|
|
99
|
+
|
|
100
|
+
# Celery stuff
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
celerybeat.pid
|
|
103
|
+
|
|
104
|
+
# SageMath parsed files
|
|
105
|
+
*.sage.py
|
|
106
|
+
|
|
107
|
+
# Environments
|
|
108
|
+
.env
|
|
109
|
+
.venv
|
|
110
|
+
env/
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
env.bak/
|
|
114
|
+
venv.bak/
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# pytype static type analyzer
|
|
135
|
+
.pytype/
|
|
136
|
+
|
|
137
|
+
# Cython debug symbols
|
|
138
|
+
cython_debug/
|
|
139
|
+
|
|
140
|
+
# setuptools_scm
|
|
141
|
+
src/*/_version.py
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# ruff
|
|
145
|
+
.ruff_cache/
|
|
146
|
+
|
|
147
|
+
# OS specific stuff
|
|
148
|
+
.DS_Store
|
|
149
|
+
.DS_Store?
|
|
150
|
+
._*
|
|
151
|
+
.Spotlight-V100
|
|
152
|
+
.Trashes
|
|
153
|
+
ehthumbs.db
|
|
154
|
+
Thumbs.db
|
|
155
|
+
|
|
156
|
+
# Common editor files
|
|
157
|
+
*~
|
|
158
|
+
*.swp
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
|
+
|
|
5
|
+
repos:
|
|
6
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
7
|
+
rev: "1.16.0"
|
|
8
|
+
hooks:
|
|
9
|
+
- id: blacken-docs
|
|
10
|
+
additional_dependencies: [black==24.*]
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
13
|
+
rev: "v4.6.0"
|
|
14
|
+
hooks:
|
|
15
|
+
- id: check-added-large-files
|
|
16
|
+
- id: check-case-conflict
|
|
17
|
+
- id: check-merge-conflict
|
|
18
|
+
- id: check-symlinks
|
|
19
|
+
- id: check-yaml
|
|
20
|
+
- id: debug-statements
|
|
21
|
+
- id: end-of-file-fixer
|
|
22
|
+
- id: mixed-line-ending
|
|
23
|
+
- id: name-tests-test
|
|
24
|
+
args: ["--pytest-test-first"]
|
|
25
|
+
- id: requirements-txt-fixer
|
|
26
|
+
- id: trailing-whitespace
|
|
27
|
+
|
|
28
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
29
|
+
rev: "v1.10.0"
|
|
30
|
+
hooks:
|
|
31
|
+
- id: rst-backticks
|
|
32
|
+
- id: rst-directive-colons
|
|
33
|
+
- id: rst-inline-touching-normal
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
36
|
+
rev: "v4.0.0-alpha.8"
|
|
37
|
+
hooks:
|
|
38
|
+
- id: prettier
|
|
39
|
+
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
40
|
+
args: [--prose-wrap=always]
|
|
41
|
+
|
|
42
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
43
|
+
rev: "v0.5.0"
|
|
44
|
+
hooks:
|
|
45
|
+
- id: ruff
|
|
46
|
+
args: ["--fix", "--show-fixes"]
|
|
47
|
+
- id: ruff-format
|
|
48
|
+
|
|
49
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
50
|
+
rev: "v1.10.1"
|
|
51
|
+
hooks:
|
|
52
|
+
- id: mypy
|
|
53
|
+
files: src|tests
|
|
54
|
+
args: []
|
|
55
|
+
additional_dependencies:
|
|
56
|
+
- pytest
|
|
57
|
+
- scikit-build-core
|
|
58
|
+
- importlib-resources
|
|
59
|
+
|
|
60
|
+
- repo: https://github.com/codespell-project/codespell
|
|
61
|
+
rev: "v2.3.0"
|
|
62
|
+
hooks:
|
|
63
|
+
- id: codespell
|
|
64
|
+
|
|
65
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
66
|
+
rev: "v0.10.0.1"
|
|
67
|
+
hooks:
|
|
68
|
+
- id: shellcheck
|
|
69
|
+
|
|
70
|
+
- repo: local
|
|
71
|
+
hooks:
|
|
72
|
+
- id: disallow-caps
|
|
73
|
+
name: Disallow improper capitalization
|
|
74
|
+
language: pygrep
|
|
75
|
+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
|
|
76
|
+
exclude: .pre-commit-config.yaml
|
|
77
|
+
|
|
78
|
+
- repo: https://github.com/abravalheri/validate-pyproject
|
|
79
|
+
rev: "v0.18"
|
|
80
|
+
hooks:
|
|
81
|
+
- id: validate-pyproject
|
|
82
|
+
additional_dependencies: ["validate-pyproject-schema-store[all]"]
|
|
83
|
+
|
|
84
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
85
|
+
rev: "0.28.6"
|
|
86
|
+
hooks:
|
|
87
|
+
- id: check-dependabot
|
|
88
|
+
- id: check-github-workflows
|
|
89
|
+
- id: check-readthedocs
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-22.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.12"
|
|
10
|
+
commands:
|
|
11
|
+
- asdf plugin add uv
|
|
12
|
+
- asdf install uv latest
|
|
13
|
+
- asdf global uv latest
|
|
14
|
+
- uv venv
|
|
15
|
+
- uv pip install .[docs]
|
|
16
|
+
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D
|
|
17
|
+
language=en docs $READTHEDOCS_OUTPUT/html
|