make variables public, vesion variable and minor changes

This commit is contained in:
bluepulsar
2026-01-04 13:29:26 +08:00
parent 807785ca7f
commit 1fe6fed9e6
6 changed files with 127 additions and 112 deletions
+7 -4
View File
@@ -11,6 +11,9 @@ import platform
from pathlib import Path
# Package version
VERSION = "0.2.0"
# Python versions to build for
PYTHON_VERSIONS = ['3.8', '3.9', '3.10']
@@ -157,7 +160,7 @@ def copy_additional_files():
shutil.copytree('config', 'dist_obfuscated/config', dirs_exist_ok=True)
# Copy README and other metadata files
files_to_copy = ['README.md', 'Readme(未完成).md', 'requirements.txt', 'LICENSE']
files_to_copy = ['README.md', 'requirements.txt', 'LICENSE']
for file in files_to_copy:
if os.path.exists(file):
print(f"Copying {file}...")
@@ -217,7 +220,7 @@ for pkg in packages:
setup(
name="orisys",
version="0.2.0",
version="{VERSION}",
description="Orisys - Optical Tactile Sensor SDK (Protected)",
author="Your Name",
package_dir={{"": "src"}},
@@ -335,7 +338,7 @@ def build_wheel_for_version(python_version):
return False
print(f"✅ Wheel for Python {python_version} on {PLATFORM_NAME} built successfully!")
print(f" Expected: orisys-0.2.0-{py_tag}-none-{plat_tag}.whl")
print(f" Expected: orisys-{VERSION}-{py_tag}-none-{plat_tag}.whl")
return True
@@ -444,7 +447,7 @@ def main():
for wheel in Path(f'dist/{PLATFORM_NAME}').glob('*.whl'):
print(f" - {wheel.name}")
print("\nInstall with:")
print(f" pip install dist/{PLATFORM_NAME}/orisys-0.2.0-*.whl")
print(f" pip install dist/{PLATFORM_NAME}/orisys-{VERSION}-*.whl")
if __name__ == '__main__':