Skip to content

Commit 29c6598

Browse files
committed
Update actions.
1 parent 37e1be8 commit 29c6598

3 files changed

Lines changed: 37 additions & 29 deletions

File tree

.github/workflows/CI.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
# Steps represent a sequence of tasks that will be executed as part of the job
3232
steps:
3333
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3535

3636
- name: Setup Python
37-
uses: actions/setup-python@v2.2.1
37+
uses: actions/setup-python@v5
3838
with:
3939
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
40-
python-version: "3.11"
40+
python-version: "3.12"
4141
# The target architecture (x86, x64) of the Python interpreter.
4242
architecture: "x64"
4343

@@ -52,15 +52,15 @@ jobs:
5252
run: python -m cibuildwheel --output-dir wheelhouse
5353

5454
- name: Upload Wheels
55-
uses: actions/upload-artifact@v2
55+
uses: actions/upload-artifact@v4
5656
with:
5757
path: ./wheelhouse/*.whl
5858

5959
- name: Build Source Distribution
6060
run: python setup.py sdist
6161

6262
- name: Upload Source Distribution
63-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v4
6464
with:
6565
path: ./dist/*.zip
6666

.github/workflows/pypi_publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
2828
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030

3131
- name: Setup Python
32-
uses: actions/setup-python@v2.2.1
32+
uses: actions/setup-python@v5
3333
with:
3434
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
35-
python-version: "3.11"
35+
python-version: "3.12"
3636
# The target architecture (x86, x64) of the Python interpreter.
3737
architecture: "x64"
3838

@@ -47,15 +47,15 @@ jobs:
4747
run: python -m cibuildwheel --output-dir wheelhouse
4848

4949
- name: Upload Wheels
50-
uses: actions/upload-artifact@v2
50+
uses: actions/upload-artifact@v4
5151
with:
5252
path: ./wheelhouse/*.whl
5353

5454
- name: Build Source Distribution
5555
run: python setup.py sdist
5656

5757
- name: Upload Source Distribution
58-
uses: actions/upload-artifact@v2
58+
uses: actions/upload-artifact@v4
5959
with:
6060
path: ./dist/*.zip
6161

@@ -64,12 +64,12 @@ jobs:
6464
runs-on: ubuntu-latest
6565
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
6666
steps:
67-
- uses: actions/download-artifact@v2
67+
- uses: actions/download-artifact@v4
6868
with:
6969
name: artifact
7070
path: dist
7171

72-
- uses: pypa/gh-action-pypi-publish@master
72+
- uses: pypa/gh-action-pypi-publish@release/v1
7373
with:
7474
user: __token__
7575
password: ${{ secrets.pypi_password }}

setup.py

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,40 @@
88

99
here = os.path.abspath(os.path.dirname(__file__))
1010

11-
define_macros = [('UNICODE', 1), ('_UNICODE', 1)]
11+
define_macros = [("UNICODE", 1), ("_UNICODE", 1)]
1212
linetrace = False
13-
if int(os.environ.get('CYTHON_LINETRACE', '0')):
13+
if int(os.environ.get("CYTHON_LINETRACE", "0")):
1414
linetrace = True
15-
define_macros.append(('CYTHON_TRACE_NOGIL', '1'))
15+
define_macros.append(("CYTHON_TRACE_NOGIL", "1"))
1616

17-
extra_compile_args = ['/Zc:wchar_t']
17+
extra_compile_args = ["/Zc:wchar_t"]
1818

19-
if platform.system() != 'Windows':
20-
extra_compile_args.append('-std=c++11')
19+
if platform.system() != "Windows":
20+
extra_compile_args.append("-std=c++11")
2121

2222
extension = Extension(
23-
'dwriteshapepy.dwriteshape',
23+
"dwriteshapepy.dwriteshape",
2424
define_macros=define_macros,
2525
include_dirs=["."],
26-
sources=['src/dwriteshapepy/dwriteshape.pyx','src/cpp/hb-common.cc','src/cpp/hb-number.cc','src/cpp/dwriteshapeInternal.cpp','src/cpp/dwriteshapelib.cpp', 'src/cpp/locale.cpp','src/cpp/posttable.cpp','src/cpp/textanalysis.cpp', 'src/cpp/textrun.cpp' ],
27-
language='c++',
28-
libraries=['dwrite'],
26+
sources=[
27+
"src/dwriteshapepy/dwriteshape.pyx",
28+
"src/cpp/hb-common.cc",
29+
"src/cpp/hb-number.cc",
30+
"src/cpp/dwriteshapeInternal.cpp",
31+
"src/cpp/dwriteshapelib.cpp",
32+
"src/cpp/locale.cpp",
33+
"src/cpp/posttable.cpp",
34+
"src/cpp/textanalysis.cpp",
35+
"src/cpp/textrun.cpp",
36+
],
37+
language="c++",
38+
libraries=["dwrite"],
2939
extra_compile_args=extra_compile_args,
3040
)
3141

3242
setup(
33-
name="dwriteshapepy",
34-
version= '1.0.8',
43+
name="dwriteshapepy",
44+
version="1.0.9",
3545
description="Python extension for Windows DirectWrite shaping, modeled after uharfbuzz ",
3646
author="Paul Linnerud",
3747
author_email="paulli@microsoft.com",
@@ -46,12 +56,10 @@
4656
packages=["dwriteshapepy"],
4757
zip_safe=False,
4858
python_requires=">=3.7",
49-
ext_modules = cythonize(
59+
ext_modules=cythonize(
5060
extension,
51-
annotate=bool(int(os.environ.get('CYTHON_ANNOTATE', '0'))),
61+
annotate=bool(int(os.environ.get("CYTHON_ANNOTATE", "0"))),
5262
compiler_directives={"linetrace": linetrace},
5363
),
54-
entry_points={
55-
'console_scripts': [ "dw-shape = dwriteshapepy.__main__:main" ]
56-
}
64+
entry_points={"console_scripts": ["dw-shape = dwriteshapepy.__main__:main"]},
5765
)

0 commit comments

Comments
 (0)