-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
339e97b
commit df8ddeb
Showing
10 changed files
with
356 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,14 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: actions/setup-[email protected] | ||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: '*' | ||
cache: pip | ||
cache: true | ||
|
||
- name: Install the development dependencies | ||
run: pip install -r requirements.txt | ||
- name: Install dependencies | ||
run: pdm install | ||
|
||
- name: Run typechecker | ||
run: pyright | ||
|
@@ -34,14 +34,14 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: actions/setup-[email protected] | ||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: '*' | ||
cache: pip | ||
cache: true | ||
|
||
- name: Install the development dependencies | ||
run: pip install -r requirements.txt | ||
- name: Install dependencies | ||
run: pdm install | ||
|
||
- name: Run linter | ||
run: pylint --recursive=y . | ||
|
@@ -53,17 +53,14 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: actions/setup-[email protected] | ||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: '*' | ||
cache: pip | ||
cache: true | ||
|
||
- name: Install the development dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Build the extension | ||
run: python setup.py build_ext --inplace | ||
- name: Install dependencies | ||
run: pdm install | ||
|
||
- name: Run tests | ||
run: pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
.vscode/ | ||
build/ | ||
dist/ | ||
*.egg-info/ | ||
|
||
*.pyc | ||
*.pyd | ||
*.pyd | ||
.pdm* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from sys import platform | ||
from typing import TypedDict | ||
|
||
from setuptools import Extension | ||
|
||
|
||
class Build(TypedDict): | ||
""" | ||
Summary | ||
------- | ||
a typed dictionary for the build | ||
Attributes | ||
---------- | ||
ext_modules (list[Extension]) : a list of extensions | ||
""" | ||
|
||
ext_modules: list[Extension] | ||
|
||
|
||
def pdm_build_initialize(_): | ||
""" | ||
Summary | ||
------- | ||
initialise the build | ||
""" | ||
if platform in ('win32', 'cygwin', 'cli'): | ||
return | ||
|
||
raise RuntimeError('keywin only supports Windows!') | ||
|
||
|
||
def pdm_build_update_setup_kwargs(_, kwargs: Build): | ||
""" | ||
Summary | ||
------- | ||
update the setup kwargs with the extension modules | ||
""" | ||
kwargs.update( | ||
ext_modules=[Extension('keywin.send_input', ['keywin/send_input/send_input.c'], libraries=['user32'])] | ||
) |
Oops, something went wrong.