Skip to content

Commit

Permalink
feat(build): Update build configuration and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed Oct 20, 2024
1 parent eb3af1c commit 4acc05b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 7 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/build-nuitka.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ jobs:
pip freeze > /tmp/modules.txt
pip uninstall -r /tmp/modules.txt -y
pip install -r requirements.txt
pip install -Ur requirements.txt
pip install imageio
cp -f /tmp/qt_translations/qt_zh_CN.qm $qt_translations_path/
ls -alh $qt_translations_path/
- name: Install dependencies(Windows)
if: ${{ runner.os == 'Windows' }}
Expand All @@ -77,10 +78,11 @@ jobs:
pip freeze | Out-File "$env:TEMP\modules.txt"
pip uninstall -r "$env:TEMP\modules.txt" -y
pip install -r requirements.txt
pip install -Ur requirements.txt
pip install imageio
Copy-Item -Force "$temp_path\qt_zh_CN.qm" -Destination "$qt_translations_path/"
Get-ChildItem -Path "$qt_translations_path/"
- name: Install EGL/upx
Expand Down Expand Up @@ -303,3 +305,28 @@ jobs:
name: ${{ runner.os }} - ${{ matrix.arch }} artifacts
path: |
upload/
build-wheel:
name: Build wheel
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
pip install -Ur requirements-dev.txt
- name: Build wheel
run: |
python -m build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Wheel
path: |
dist/
18 changes: 13 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ dependencies = [
"requests",
"mutagen",
"diskcache",
"chardet",
"charset-normalizer",
"pyaes",
"psutil",
"pyobjc; sys_platform == 'darwin'",
]
requires-python = ">= 3.10"
description = "A lyrics acquisition tool"
readme = "README.md"
authors = [
maintainers = [
{name = "沉默の金", email = "[email protected]"}
]
license = {file = "LICENSE"}
keywords = ["lyrics","music","download","acquisition","tool"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Environment :: MacOS X ",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: X11 Applications :: Qt",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
Expand All @@ -43,8 +43,16 @@ repository = "https://github.com/chenmozhijin/LDDC"
documentation = "https://github.com/chenmozhijin/LDDC/wiki"
tracker = "https://github.com/chenmozhijin/LDDC/issues"

[tool.setuptools.dynamic]
version = {attr = "LDDC.__version__"}
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = ["LDDC/**"]
exclude = ["*.ui", "*.qrc", "LDDC/res/img", "LDDC/res/i18n"]

[tool.hatch.version]
path = "LDDC/utils/version.py"

[tool.ruff]
target-version = "py310"
Expand Down
10 changes: 10 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
requests
PySide6-Essentials>=6.8.0
mutagen
diskcache
charset-normalizer
pyaes
psutil
pyobjc; sys_platform == 'darwin'
hatchling
build

0 comments on commit 4acc05b

Please sign in to comment.