Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,45 @@ on:
workflow_dispatch:

jobs:
build_stubs:
name: Build VCL Stubs
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.11']
include:
- os: [windows-latest]
arch: ["AMD64"]

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Build and Install VCL
run: |
python -m pip install setuptools --upgrade
python -m pip install wheel --upgrade
python setup.py install

- name: Install mypy
run: |
python -m pip install git+https://github.com/lmbelo/mypy.git

- name: Build Stubs
run: |
python -m mypy.stubgen -m delphivcl -o .\delphivcl --include-docstrings
ren .\delphivcl\delphivcl.pyi __init__.pyi

- name: Cache Stubs
id: cache-stubs
uses: actions/cache@v3
with:
path: .\delphivcl\__init__.pyi
key: ${{ runner.os }}-stubs

build_wheels_win_32:
name: Build Windows x86 wheels for Python ${{ matrix.python }}
needs: [build_stubs]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -21,6 +58,13 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Restore Cached Stubs
id: cache-stubs
uses: actions/cache@v3
with:
path: .\delphivcl\__init__.pyi
key: ${{ runner.os }}-stubs

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
Expand All @@ -42,6 +86,7 @@ jobs:

build_wheels_win_64:
name: Build Windows x64 wheels for Python ${{ matrix.python }}
needs: [build_stubs]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -54,6 +99,13 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Restore Cached Stubs
id: cache-stubs
uses: actions/cache@v3
with:
path: .\delphivcl\__init__.pyi
key: ${{ runner.os }}-stubs

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
recursive-include delphivcl *.pyd
recursive-include delphivcl *.pyi
recursive-include delphivcl docs.xml
Binary file modified lib/Win32/DelphiVCL.pyd
Binary file not shown.
Binary file modified lib/Win64/DelphiVCL.pyd
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ cmdclass =
bdist_wheel = build.BDistWheel

[options.package_data]
* = *.pyd, *.xml
* = *.pyd, *.pyi, *.xml