Difficult-Rocket/mods/dr_game/Difficult_Rocket_rs/src/setup.py

35 lines
857 B
Python
Raw Normal View History

2023-01-20 18:31:05 +08:00
# -------------------------------
# Difficult Rocket
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
# All rights reserved
# -------------------------------
2023-01-20 20:20:35 +08:00
import sys
2023-01-20 18:31:05 +08:00
import shutil
from setuptools import setup
2023-06-10 14:46:19 +08:00
from setuptools_rust import Binding, RustExtension, Strip
2023-01-20 18:31:05 +08:00
2023-12-03 16:54:07 +08:00
package_path = "Difficult_Rocket_rs"
2023-01-20 18:31:05 +08:00
setup(
2023-12-03 16:54:07 +08:00
name="Difficult_Rocket_rs",
2023-12-21 20:44:13 +08:00
version="0.3.0",
2023-12-03 16:54:07 +08:00
author="shenjackyuanjie",
author_email="3695888@qq.com",
rust_extensions=[
RustExtension(
target="Difficult_Rocket_rs.Difficult_Rocket_rs",
binding=Binding.PyO3,
strip=Strip.All,
)
],
2023-01-23 23:46:43 +08:00
zip_safe=False,
2023-01-20 18:31:05 +08:00
)
2023-12-03 16:54:07 +08:00
lib_path = "../lib"
build_path = "build"
2023-01-20 18:31:05 +08:00
2023-12-03 16:54:07 +08:00
if "clean" in sys.argv:
2023-01-20 20:20:35 +08:00
shutil.rmtree(build_path, ignore_errors=True)
2023-12-03 16:54:07 +08:00
shutil.rmtree(f"{package_path}.egg-info", ignore_errors=True)
2023-01-20 20:20:35 +08:00
sys.exit(0)