Skip to content

Commit 129193c

Browse files
Initial commit
0 parents  commit 129193c

File tree

20 files changed

+1498
-0
lines changed

20 files changed

+1498
-0
lines changed

.appveyor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '{build}'
2+
image: Visual Studio 2019
3+
stack: python 3.7
4+
skip_branch_with_pr: true
5+
init:
6+
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
7+
install:
8+
- ps: python -m pip install --disable-pip-version-check --upgrade --no-warn-script-location pip build virtualenv wheel
9+
build_script:
10+
- ps: |
11+
python -m pip install .
12+
test_script:
13+
- ps: python tests\test.py

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
- "*"

.github/workflows/conda.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Conda
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
platform: [ubuntu-latest, windows-latest, macos-12]
20+
python-version: ["3.8", "3.10"]
21+
22+
runs-on: ${{ matrix.platform }}
23+
24+
# The setup-miniconda action needs this to activate miniconda
25+
defaults:
26+
run:
27+
shell: "bash -l {0}"
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Get conda
33+
uses: conda-incubator/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
channels: conda-forge
37+
38+
- name: Prepare
39+
run: conda install conda-build conda-verify
40+
41+
- name: Build
42+
run: conda build conda.recipe
43+
44+
- name: Install
45+
run: conda install -c ${CONDA_PREFIX}/conda-bld/ python_example
46+
47+
- name: Test
48+
run: python tests/test.py

.github/workflows/pip.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Pip
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
platform: [windows-latest, macos-13, ubuntu-latest]
20+
python-version: ["3.7", "3.11"]
21+
22+
runs-on: ${{ matrix.platform }}
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Add requirements
32+
run: python -m pip install --upgrade wheel setuptools
33+
34+
- name: Build and install
35+
run: pip install --verbose .
36+
37+
- name: Test
38+
run: python tests/test.py
39+
40+
build-mingw64:
41+
runs-on: windows-latest
42+
defaults:
43+
run:
44+
shell: msys2 {0}
45+
steps:
46+
- uses: msys2/setup-msys2@v2
47+
with:
48+
update: true
49+
install: >-
50+
mingw-w64-x86_64-gcc
51+
mingw-w64-x86_64-python-pip
52+
mingw-w64-x86_64-python-wheel
53+
54+
- uses: actions/checkout@v4
55+
56+
- name: Install pybind11
57+
# This is required because --no-build-isolation disable dependences
58+
# installation
59+
run: pip install pybind11
60+
61+
- name: Build and install
62+
# --no-build-isolation is required because the vanilla setuptool does not
63+
# support Mingw64.See patches here:
64+
# https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-setuptools
65+
# Without those patches build_ext fails with:
66+
# error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
67+
run: pip install --no-build-isolation .
68+
69+
- name: Test
70+
run: python tests/test.py

.github/workflows/wheels.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build_sdist:
19+
name: Build SDist
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Build SDist
25+
run: pipx run build --sdist
26+
27+
- name: Check metadata
28+
run: pipx run twine check dist/*
29+
30+
- uses: actions/upload-artifact@v4
31+
with:
32+
name: cibw-sdist
33+
path: dist/*.tar.gz
34+
35+
36+
build_wheels:
37+
name: Wheels on ${{ matrix.os }}
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
os: [ubuntu-latest, windows-latest, macos-13]
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- uses: pypa/[email protected]
48+
env:
49+
CIBW_ARCHS_MACOS: auto universal2
50+
51+
- name: Verify clean directory
52+
run: git diff --exit-code
53+
shell: bash
54+
55+
- name: Upload wheels
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: cibw-wheels-${{ matrix.os }}
59+
path: wheelhouse/*.whl
60+
61+
62+
upload_all:
63+
name: Upload if release
64+
needs: [build_wheels, build_sdist]
65+
runs-on: ubuntu-latest
66+
if: github.event_name == 'release' && github.event.action == 'published'
67+
68+
steps:
69+
- uses: actions/setup-python@v5
70+
with:
71+
python-version: "3.x"
72+
73+
- uses: actions/download-artifact@v4
74+
with:
75+
pattern: cibw-*
76+
path: dist
77+
merge-multiple: true
78+
- uses: pypa/gh-action-pypi-publish@release/v1
79+
with:
80+
user: __token__
81+
password: ${{ secrets.pypi_password }}

.gitignore

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
100+
__pypackages__/
101+
102+
# Celery stuff
103+
celerybeat-schedule
104+
celerybeat.pid
105+
106+
# SageMath parsed files
107+
*.sage.py
108+
109+
# Environments
110+
.env
111+
.venv
112+
env/
113+
venv/
114+
ENV/
115+
env.bak/
116+
venv.bak/
117+
118+
# Spyder project settings
119+
.spyderproject
120+
.spyproject
121+
122+
# Rope project settings
123+
.ropeproject
124+
125+
# mkdocs documentation
126+
/site
127+
128+
# mypy
129+
.mypy_cache/
130+
.dmypy.json
131+
dmypy.json
132+
133+
# Pyre type checker
134+
.pyre/
135+
136+
# pytype static type analyzer
137+
.pytype/
138+
139+
# Cython debug symbols
140+
cython_debug/

0 commit comments

Comments
 (0)