Skip to content

Commit ffd42dd

Browse files
Improve build (#1272)
* Remove unused imports These are defined in pyproject.toml * Update bdist_wheel import * Fix archive creation
1 parent c2e05b8 commit ffd42dd

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

.github/workflows/python-build.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install dependencies
3232
run: |
3333
python -m pip install --upgrade pip
34-
pip install setuptools wheel twine pyinstaller~=6.18 build
34+
pip install twine pyinstaller~=6.18 build
3535
3636
- name: Setup
3737
run: |
@@ -41,19 +41,7 @@ jobs:
4141
4242
- name: PyInstaller build
4343
run: |
44-
built_path=Amulet-v${{ github.event.release.tag_name }}-$RUNNER_OS-${{ matrix.cfg.architecture }}.zip
45-
echo "BUILT_PATH=$built_path" >> $GITHUB_ENV
4644
python -m PyInstaller -y Amulet.spec
47-
cd dist
48-
if [ "$RUNNER_OS" == "Windows" ]; then
49-
7z a $built_path Amulet
50-
elif [ "$RUNNER_OS" == "macOS" ]; then
51-
zip -r $built_path Amulet
52-
else
53-
echo "$RUNNER_OS not supported"
54-
exit 1
55-
fi
56-
cd ..
5745
5846
- name: Publish to PyPi
5947
env:
@@ -65,5 +53,5 @@ jobs:
6553
- name: Upload Release Asset
6654
uses: actions/upload-artifact@v4
6755
with:
68-
name: ${{env.BUILT_PATH}}
69-
path: ./dist/${{env.BUILT_PATH}}
56+
name: Amulet-${{ github.event.release.tag_name }}-$RUNNER_OS-${{ matrix.cfg.architecture }}.zip
57+
path: ./dist/Amulet

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = [
33
"setuptools >= 42",
4-
"wheel",
54
"cython >= 3.0.0a9",
65
"versioneer",
76
"numpy ~= 1.17"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import List, Tuple
22
from setuptools import setup, find_packages
3-
from wheel.bdist_wheel import bdist_wheel
3+
from setuptools.command.bdist_wheel import bdist_wheel
44
from Cython.Build import cythonize
55
import glob
66
import sys

0 commit comments

Comments
 (0)