Skip to content

Commit 691f744

Browse files
committed
Fix build
1 parent a799348 commit 691f744

8 files changed

Lines changed: 83 additions & 102 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and publish CPU 🐍📦 to PyPI
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
build-n-publish:
9+
if: startsWith(github.ref, 'refs/tags/')
10+
name: Build and publish CPU 🐍📦 to PyPI
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi-cpu
14+
url: https://pypi.org/p/anylabeling
15+
permissions:
16+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.x"
23+
- name: Install pypa/build
24+
run: >-
25+
python -m pip install build==1.2.2 twine==6.1.0 --user
26+
- name: Set preferred device to CPU
27+
run: >-
28+
sed -i'' -e 's/\_\_preferred_device\_\_[ ]*=[ ]*\"[A-Za-z0-9]*\"/__preferred_device__ = "CPU"/g' anylabeling/app_info.py
29+
- name: Build a binary wheel and a source tarball
30+
run: >-
31+
python -m build --sdist --wheel --outdir dist/ .
32+
- name: Publish distribution 📦 to PyPI
33+
if: startsWith(github.ref, 'refs/tags')
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
skip-existing: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and publish GPU 🐍📦 to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
10+
build-n-publish-gpu:
11+
if: startsWith(github.ref, 'refs/tags/')
12+
name: Build and publish GPU 🐍📦 to PyPI
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi-gpu
16+
url: https://pypi.org/p/anylabeling-gpu
17+
permissions:
18+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.x"
25+
- name: Install pypa/build
26+
run: >-
27+
python -m pip install build==1.2.2 twine==6.1.0 --user
28+
- name: Set preferred device to GPU
29+
run: >-
30+
sed -i'' -e 's/\_\_preferred_device\_\_[ ]*=[ ]*\"[A-Za-z0-9]*\"/__preferred_device__ = "GPU"/g' anylabeling/app_info.py
31+
32+
- name: Build a binary wheel and a source tarball
33+
run: >-
34+
python -m build --wheel --outdir dist/ .
35+
- name: Publish distribution 📦 to PyPI
36+
if: startsWith(github.ref, 'refs/tags')
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
skip-existing: true

.github/workflows/python-publish.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

anylabeling/app_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__appname__ = "AnyLabeling"
22
__appdescription__ = "Effortless data labeling with AI support"
3-
__version__ = "0.4.17"
3+
__version__ = "0.4.23"
44
__preferred_device__ = "CPU" # GPU or CPU

pyproject.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
[tool.black]
2-
line-length = 79
3-
#include = '\.pyi?$'
4-
exclude = '''
5-
/(
6-
\.git
7-
| \.hg
8-
| \.mypy_cache
9-
| \.tox
10-
| \.venv
11-
| _build
12-
| buck-out
13-
| build
14-
| dist
15-
)/
16-
'''
17-
181
[build-system]
192
requires = ["setuptools", "wheel"]
203
build-backend = "setuptools.build_meta"
21-

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-r requirements.txt
2-
build
3-
twine
4-
black
2+
build==1.2.2
3+
twine==6.1.0
4+

requirements-gpu-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements-gpu.txt
2-
build
3-
twine
2+
build==1.2.2
3+
twine==6.1.0

requirements-macos-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements-macos.txt
2-
build
3-
twine
2+
build==1.2.2
3+
twine==6.1.0

0 commit comments

Comments
 (0)