更新setup和build,完善自动版本号
Build and Publish / Run (push) Has been cancelled
Details
Build and Publish / Run (push) Has been cancelled
Details
This commit is contained in:
parent
cd4ce77532
commit
f57c226eec
|
@ -10,7 +10,7 @@ jobs:
|
|||
url: https://pypi.org/p/<your-pypi-project-name>
|
||||
steps:
|
||||
- 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
|
||||
run: |
|
||||
echo "--- write source ---"
|
||||
|
@ -28,6 +28,9 @@ jobs:
|
|||
python3 -m pip install setuptools wheel twine -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
- name: CheckOut
|
||||
uses: http://hmtsai.cn:3000/actions/checkout@v4
|
||||
- name: Write Config
|
||||
run: |
|
||||
echo "${{ gitea.run_id }}">runid.conf
|
||||
- name: Build
|
||||
run: python3 setup.py sdist bdist_wheel
|
||||
- name: Check
|
||||
|
|
20
setup.py
20
setup.py
|
@ -1,17 +1,31 @@
|
|||
import sys
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
####### config #######
|
||||
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(
|
||||
name="magictk",
|
||||
version=VERSION,
|
||||
version=set_v,
|
||||
packages=(
|
||||
find_packages(where="./magictk")
|
||||
),
|
||||
package_dir={
|
||||
"magictk": "./magictk",
|
||||
},
|
||||
install_requires=[]+pywin32_need,
|
||||
install_requires=["pywin32"],
|
||||
author='cxykevin|git.hmtsai.cn',
|
||||
author_email='cxykevin@yeah.net',
|
||||
description='A tkinter weights looks like element-plus',
|
||||
|
|
Loading…
Reference in New Issue