ptoas 0.0.1__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,11 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,65 @@
1
+ name: CIBW cross-compile
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ branches:
7
+ - master
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+
14
+ jobs:
15
+ build:
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - platform: android
21
+ os: ubuntu-latest
22
+ - platform: android
23
+ os: macos-latest
24
+ - platform: ios
25
+ os: macos-latest
26
+ archs: all
27
+ - platform: pyodide
28
+ os: ubuntu-latest
29
+
30
+ name: ${{ matrix.platform }} on ${{ matrix.os }}
31
+ runs-on: ${{ matrix.os }}
32
+
33
+ steps:
34
+ - uses: actions/checkout@v5
35
+
36
+ - uses: actions/setup-python@v6
37
+
38
+ - if: matrix.platform == 'ios'
39
+ run: brew upgrade cmake
40
+
41
+ # GitHub Actions can't currently run the Android emulator on macOS.
42
+ - name: Skip Android tests on macOS
43
+ if: runner.os == 'macOS'
44
+ run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV"
45
+
46
+ # https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
47
+ - name: Enable KVM for Android emulator
48
+ if: runner.os == 'Linux' && matrix.platform == 'android'
49
+ run: |
50
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
51
+ sudo udevadm control --reload-rules
52
+ sudo udevadm trigger --name-match=kvm
53
+
54
+ - if: matrix.platform == 'android'
55
+ run: pipx install patchelf
56
+
57
+ - uses: pypa/cibuildwheel@v3.3
58
+ env:
59
+ CIBW_PLATFORM: ${{ matrix.platform }}
60
+ CIBW_ARCHS: ${{ matrix.archs || 'auto' }}
61
+
62
+ - uses: actions/upload-artifact@v5
63
+ with:
64
+ name: wheels-${{ matrix.platform }}-${{ matrix.os }}
65
+ path: dist/*.whl
@@ -0,0 +1,44 @@
1
+ name: Conda
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - master
8
+ pull_request:
9
+
10
+ jobs:
11
+ build:
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ platform: [ubuntu-latest]
16
+ python-version: ["3.10", "3.13"]
17
+
18
+ runs-on: ${{ matrix.platform }}
19
+
20
+ # The setup-miniconda action needs this to activate miniconda
21
+ defaults:
22
+ run:
23
+ shell: "bash -l {0}"
24
+
25
+ steps:
26
+ - uses: actions/checkout@v5
27
+
28
+ - name: Get conda
29
+ uses: conda-incubator/setup-miniconda@v3.2.0
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ channels: conda-forge
33
+
34
+ - name: Prepare
35
+ run: conda install conda-build conda-verify pytest
36
+
37
+ - name: Build
38
+ run: conda build conda.recipe
39
+
40
+ - name: Install
41
+ run: conda install -c ${CONDA_PREFIX}/conda-bld/ scikit_build_example
42
+
43
+ - name: Test
44
+ run: pytest tests
@@ -0,0 +1,32 @@
1
+ name: "Pip"
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - master
9
+
10
+ jobs:
11
+ build:
12
+ name: Build with Pip
13
+ runs-on: ${{ matrix.platform }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ platform: [windows-latest, macos-latest, ubuntu-latest]
18
+ python-version: ["3.9", "3.14", "pypy-3.10"]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v5
22
+
23
+ - uses: actions/setup-python@v6
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ allow-prereleases: true
27
+
28
+ - name: Build and install
29
+ run: pip install --verbose . --group test
30
+
31
+ - name: Test
32
+ run: pytest
@@ -0,0 +1,94 @@
1
+ name: Wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - master
9
+ release:
10
+ types:
11
+ - published
12
+
13
+ env:
14
+ FORCE_COLOR: 3
15
+
16
+ concurrency:
17
+ group: ${{ github.workflow }}-${{ github.ref }}
18
+ cancel-in-progress: true
19
+
20
+ jobs:
21
+ build_sdist:
22
+ name: Build SDist
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v5
26
+ with:
27
+ submodules: true
28
+
29
+ - name: Build SDist
30
+ run: pipx run build --sdist
31
+
32
+ - name: Check metadata
33
+ run: pipx run twine check dist/*
34
+
35
+ - uses: actions/upload-artifact@v5
36
+ with:
37
+ name: cibw-sdist
38
+ path: dist/*.tar.gz
39
+
40
+
41
+ build_wheels:
42
+ name: Wheels on ${{ matrix.os }}
43
+ runs-on: ${{ matrix.os }}
44
+ strategy:
45
+ fail-fast: false
46
+ matrix:
47
+ os: [ubuntu-latest, macos-13, macos-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm]
48
+
49
+ steps:
50
+ - uses: actions/checkout@v5
51
+ with:
52
+ submodules: true
53
+
54
+ - uses: astral-sh/setup-uv@v7
55
+
56
+ - uses: pypa/cibuildwheel@v3.3
57
+
58
+ - name: Verify clean directory
59
+ run: git diff --exit-code
60
+ shell: bash
61
+
62
+ - uses: actions/upload-artifact@v5
63
+ with:
64
+ name: cibw-wheels-${{ matrix.os }}
65
+ path: wheelhouse/*.whl
66
+
67
+
68
+ upload_all:
69
+ name: Upload if release
70
+ needs: [build_wheels, build_sdist]
71
+ runs-on: ubuntu-latest
72
+ if: github.event_name == 'release' && github.event.action == 'published'
73
+ environment: pypi
74
+ permissions:
75
+ id-token: write
76
+ attestations: write
77
+
78
+ steps:
79
+ - uses: actions/setup-python@v6
80
+ with:
81
+ python-version: "3.x"
82
+
83
+ - uses: actions/download-artifact@v6
84
+ with:
85
+ pattern: cibw-*
86
+ merge-multiple: true
87
+ path: dist
88
+
89
+ - name: Generate artifact attestation for sdist and wheels
90
+ uses: actions/attest-build-provenance@v3
91
+ with:
92
+ subject-path: "dist/*"
93
+
94
+ - uses: pypa/gh-action-pypi-publish@release/v1
ptoas-0.0.1/.gitignore ADDED
@@ -0,0 +1,144 @@
1
+ # Using https://github.com/github/gitignore/blob/master/Python.gitignore
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+ docs/_generate/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
101
+ __pypackages__/
102
+
103
+ # Celery stuff
104
+ celerybeat-schedule
105
+ celerybeat.pid
106
+
107
+ # SageMath parsed files
108
+ *.sage.py
109
+
110
+ # Environments
111
+ .env
112
+ .venv
113
+ env/
114
+ venv/
115
+ ENV/
116
+ env.bak/
117
+ venv.bak/
118
+
119
+ # Spyder project settings
120
+ .spyderproject
121
+ .spyproject
122
+
123
+ # Rope project settings
124
+ .ropeproject
125
+
126
+ # mkdocs documentation
127
+ /site
128
+
129
+ # mypy
130
+ .mypy_cache/
131
+ .dmypy.json
132
+ dmypy.json
133
+
134
+ # Pyre type checker
135
+ .pyre/
136
+
137
+ # pytype static type analyzer
138
+ .pytype/
139
+
140
+ # Cython debug symbols
141
+ cython_debug/
142
+
143
+ _skbuild/
144
+ .pyodide-xbuildenv/
@@ -0,0 +1,65 @@
1
+ # To use:
2
+ #
3
+ # pre-commit run -a
4
+ #
5
+ # Or:
6
+ #
7
+ # pre-commit install # (runs every time you commit in git)
8
+ #
9
+ # To update this file:
10
+ #
11
+ # pre-commit autoupdate
12
+ #
13
+ # See https://github.com/pre-commit/pre-commit
14
+
15
+ ci:
16
+ autoupdate_commit_msg: "chore: update pre-commit hooks"
17
+ autofix_commit_msg: "style: pre-commit fixes"
18
+
19
+ repos:
20
+ # Standard hooks
21
+ - repo: https://github.com/pre-commit/pre-commit-hooks
22
+ rev: v6.0.0
23
+ hooks:
24
+ - id: check-added-large-files
25
+ - id: check-case-conflict
26
+ - id: check-merge-conflict
27
+ - id: check-symlinks
28
+ - id: check-yaml
29
+ exclude: ^conda\.recipe/meta\.yaml$
30
+ - id: debug-statements
31
+ - id: end-of-file-fixer
32
+ - id: mixed-line-ending
33
+ - id: requirements-txt-fixer
34
+ - id: trailing-whitespace
35
+
36
+ # Check linting and style issues
37
+ - repo: https://github.com/astral-sh/ruff-pre-commit
38
+ rev: "v0.14.5"
39
+ hooks:
40
+ - id: ruff
41
+ args: ["--fix", "--show-fixes"]
42
+ - id: ruff-format
43
+ exclude: ^(docs)
44
+
45
+ # Changes tabs to spaces
46
+ - repo: https://github.com/Lucas-C/pre-commit-hooks
47
+ rev: v1.5.5
48
+ hooks:
49
+ - id: remove-tabs
50
+ exclude: ^(docs)
51
+
52
+ # CMake formatting
53
+ - repo: https://github.com/cheshirekow/cmake-format-precommit
54
+ rev: v0.6.13
55
+ hooks:
56
+ - id: cmake-format
57
+ additional_dependencies: [pyyaml]
58
+ types: [file]
59
+ files: (\.cmake|CMakeLists.txt)(.in)?$
60
+
61
+ # Suggested hook if you add a .clang-format file
62
+ # - repo: https://github.com/pre-commit/mirrors-clang-format
63
+ # rev: v13.0.0
64
+ # hooks:
65
+ # - id: clang-format
@@ -0,0 +1,23 @@
1
+ # Require CMake 3.15+ (matching scikit-build-core) Use new versions of all
2
+ # policies up to CMake 4.0
3
+ cmake_minimum_required(VERSION 3.15...4.0)
4
+
5
+ # Scikit-build-core sets these values for you, or you can just hard-code the
6
+ # name and version.
7
+ project(
8
+ ${SKBUILD_PROJECT_NAME}
9
+ VERSION ${SKBUILD_PROJECT_VERSION}
10
+ LANGUAGES CXX)
11
+
12
+ # Find pybind11 and Python
13
+ find_package(pybind11 CONFIG REQUIRED)
14
+
15
+ # Add a library using FindPython's tooling (pybind11 also provides a helper like
16
+ # this)
17
+ pybind11_add_module(_core src/main.cpp)
18
+
19
+ # This is passing in the version as a define just as an example
20
+ target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
21
+
22
+ # The install directory is the output (wheel) directory
23
+ install(TARGETS _core DESTINATION scikit_build_example)
ptoas-0.0.1/LICENSE ADDED
@@ -0,0 +1,36 @@
1
+ Copyright (c) 2016 The Pybind Development Team, All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this
7
+ list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+
13
+ 3. Neither the name of the copyright holder nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ You are under no obligation whatsoever to provide any bug fixes, patches, or
29
+ upgrades to the features, functionality or performance of the source code
30
+ ("Enhancements") to anyone; however, if you choose to make your Enhancements
31
+ available either publicly, or directly to the author of this software, without
32
+ imposing a separate written license agreement for such Enhancements, then you
33
+ hereby grant the following license: a non-exclusive, royalty-free perpetual
34
+ license to install, use, modify, prepare derivative works, incorporate into
35
+ other computer software, distribute, and sublicense such enhancements or
36
+ derivative works thereof, in binary and source code form.
ptoas-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: ptoas
3
+ Version: 0.0.1
4
+ Summary: A minimal example package (with pybind11)
5
+ Author-Email: Anastasios Zouzias <<my last name>@<Google email>.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+
16
+ # scikit_build_example
17
+
18
+ [![Gitter][gitter-badge]][gitter-link]
19
+
20
+ | CI | status |
21
+ |----------------------|--------|
22
+ | conda.recipe | [![Conda Actions Status][actions-conda-badge]][actions-conda-link] |
23
+ | pip builds | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] |
24
+
25
+
26
+ An example project built with [pybind11][] and [scikit-build-core][]. Python
27
+ 3.9+ (see older commits for 3.7+, or even older versions of Python using [scikit-build (classic)][]).
28
+
29
+
30
+ [gitter-badge]: https://badges.gitter.im/pybind/Lobby.svg
31
+ [gitter-link]: https://gitter.im/pybind/Lobby
32
+ [actions-badge]: https://github.com/pybind/scikit_build_example/workflows/Tests/badge.svg
33
+ [actions-conda-link]: https://github.com/pybind/scikit_build_example/actions?query=workflow%3AConda
34
+ [actions-conda-badge]: https://github.com/pybind/scikit_build_example/workflows/Conda/badge.svg
35
+ [actions-pip-link]: https://github.com/pybind/scikit_build_example/actions?query=workflow%3APip
36
+ [actions-pip-badge]: https://github.com/pybind/scikit_build_example/workflows/Pip/badge.svg
37
+ [actions-wheels-link]: https://github.com/pybind/scikit_build_example/actions?query=workflow%3AWheels
38
+ [actions-wheels-badge]: https://github.com/pybind/scikit_build_example/workflows/Wheels/badge.svg
39
+
40
+ ## Installation
41
+
42
+ - Clone this repository
43
+ - `pip install ./scikit_build_example`
44
+
45
+ ## Test call
46
+
47
+ ```python
48
+ import scikit_build_example
49
+
50
+ scikit_build_example.add(1, 2)
51
+ ```
52
+
53
+ ## Files
54
+
55
+ This example has several files that are a good idea, but aren't strictly
56
+ necessary. The necessary files are:
57
+
58
+ * `pyproject.toml`: The Python project file
59
+ * `CMakeLists.txt`: The CMake configuration file
60
+ * `src/main.cpp`: The source file for the C++ build
61
+ * `src/scikit_build_example/__init__.py`: The Python portion of the module. The root of the module needs to be `<package_name>`, `src/<package_name>`, or `python/<package_name>` to be auto-discovered.
62
+
63
+ These files are also expected and highly recommended:
64
+
65
+ * `.gitignore`: Git's ignore list, also used by `scikit-build-core` to select files for the SDist
66
+ * `README.md`: The source for the PyPI description
67
+ * `LICENSE`: The license file
68
+
69
+ There are also several completely optional directories:
70
+
71
+ * `.github`: configuration for [Dependabot][] and [GitHub Actions][]
72
+ * `conda.recipe`: Example recipe. Normally you should submit projects to conda-forge instead of building them yourself, but this is useful for testing the example.
73
+ * `docs/`: Documentation
74
+ * `tests/`: Tests go here
75
+
76
+ And some optional files:
77
+
78
+ * `.pre-commit-config.yaml`: Configuration for the fantastic static-check runner [pre-commit][].
79
+ * `noxfile.py`: Configuration for the [nox][] task runner, which helps make setup easier for contributors.
80
+
81
+ This is a simplified version of the recommendations in the [Scientific-Python
82
+ Development Guide][], which is a _highly_ recommended read for anyone
83
+ interested in Python package development (Scientific or not). The guide also
84
+ has a cookiecutter that includes scikit-build-core and pybind11 as a backend
85
+ choice.
86
+
87
+ ### CI Examples
88
+
89
+ There are examples for CI in `.github/workflows`. A simple way to produces
90
+ binary "wheels" for all platforms is illustrated in the "wheels.yml" file,
91
+ using [cibuildwheel][].
92
+
93
+ ## License
94
+
95
+ pybind11 is provided under a BSD-style license that can be found in the LICENSE
96
+ file. By using, distributing, or contributing to this project, you agree to the
97
+ terms and conditions of this license.
98
+
99
+ [cibuildwheel]: https://cibuildwheel.readthedocs.io
100
+ [scientific-python development guide]: https://learn.scientific-python.org/development
101
+ [dependabot]: https://docs.github.com/en/code-security/dependabot
102
+ [github actions]: https://docs.github.com/en/actions
103
+ [pre-commit]: https://pre-commit.com
104
+ [nox]: https://nox.thea.codes
105
+ [pybind11]: https://pybind11.readthedocs.io
106
+ [scikit-build-core]: https://scikit-build-core.readthedocs.io
107
+ [scikit-build (classic)]: https://scikit-build.readthedocs.io