更新setup和build,完善自动版本号
Build and Publish / Run (push) Has been cancelled Details

This commit is contained in:
cxykevin 2024-04-17 22:08:46 +08:00
parent cd4ce77532
commit f57c226eec
2 changed files with 21 additions and 4 deletions

View File

@ -10,7 +10,7 @@ jobs:
url: https://pypi.org/p/<your-pypi-project-name> url: https://pypi.org/p/<your-pypi-project-name>
steps: steps:
- name: Info - name: Info
run: echo "OS=${{ runner.os }} NAME=${{ gitea.event_name }} REPO=${{ gitea.repository }} BRANCH=${{ gitea.ref }} ST=${{ job.status }}" run: echo "OS=${{ runner.os }} NAME=${{ gitea.event_name }} REPO=${{ gitea.repository }} BRANCH=${{ gitea.ref }} ST=${{ job.status }} RUNID=${{ gitea.run_id }}"
- name: Prepare Source - name: Prepare Source
run: | run: |
echo "--- write source ---" echo "--- write source ---"
@ -28,6 +28,9 @@ jobs:
python3 -m pip install setuptools wheel twine -i https://pypi.tuna.tsinghua.edu.cn/simple python3 -m pip install setuptools wheel twine -i https://pypi.tuna.tsinghua.edu.cn/simple
- name: CheckOut - name: CheckOut
uses: http://hmtsai.cn:3000/actions/checkout@v4 uses: http://hmtsai.cn:3000/actions/checkout@v4
- name: Write Config
run: |
echo "${{ gitea.run_id }}">runid.conf
- name: Build - name: Build
run: python3 setup.py sdist bdist_wheel run: python3 setup.py sdist bdist_wheel
- name: Check - name: Check

View File

@ -1,17 +1,31 @@
import sys import sys
import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
####### config #######
VERSION = "0.0.2" VERSION = "0.0.2"
pywin32_need = ([] if sys.platform.startswith("linux") else ["pywin32"]) ######################
set_v = VERSION
if (os.path.exists("runid.conf")):
with open("runid.conf", "r") as file:
runid = file.read()
set_v = set_v+"."+runid
else:
set_v = set_v+"."+"1000"
print("BUILD: version="+set_v)
setup( setup(
name="magictk", name="magictk",
version=VERSION, version=set_v,
packages=( packages=(
find_packages(where="./magictk") find_packages(where="./magictk")
), ),
package_dir={ package_dir={
"magictk": "./magictk", "magictk": "./magictk",
}, },
install_requires=[]+pywin32_need, install_requires=["pywin32"],
author='cxykevin|git.hmtsai.cn', author='cxykevin|git.hmtsai.cn',
author_email='cxykevin@yeah.net', author_email='cxykevin@yeah.net',
description='A tkinter weights looks like element-plus', description='A tkinter weights looks like element-plus',