From 71226982447629c3c48a93248e075dce5faa9f1a Mon Sep 17 00:00:00 2001 From: Xiangru Lian Date: Thu, 10 Jun 2021 12:00:07 +0800 Subject: [PATCH] fix: remove __init__.py and python __version__, use cargo version --- bagua-core-py/__init__.py | 4 ---- bagua-core-py/__init__.pyi | 7 ------- pyproject.toml | 2 -- setup.py | 4 +--- 4 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 bagua-core-py/__init__.pyi diff --git a/bagua-core-py/__init__.py b/bagua-core-py/__init__.py index c62f9e6..e69de29 100644 --- a/bagua-core-py/__init__.py +++ b/bagua-core-py/__init__.py @@ -1,4 +0,0 @@ -# type: ignore - -from .bagua_comm_core import * -from .version import __version__ diff --git a/bagua-core-py/__init__.pyi b/bagua-core-py/__init__.pyi deleted file mode 100644 index fb2241a..0000000 --- a/bagua-core-py/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from typing import Any - -BaguaBucketPy: Any -BaguaCommBackendPy: Any -BaguaSingleCommunicatorPy: Any -BaguaTensorPy: Any -show_version: Any diff --git a/pyproject.toml b/pyproject.toml index 8c3b2ad..5a8869a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,5 +3,3 @@ requires = ["setuptools", "wheel", "setuptools-rust", "colorama", "tqdm", "setup [tool.setuptools_scm] local_scheme = "no-local-version" -write_to = "bagua-core-py/version.py" -write_to_template = "__version__ = \"{version}\"" diff --git a/setup.py b/setup.py index 96516f8..0ecc794 100644 --- a/setup.py +++ b/setup.py @@ -58,9 +58,7 @@ def install_dependency_library(): setup( name="bagua-core", - use_scm_version={"local_scheme": "no-local-version", - 'write_to': 'bagua-core-py/version.py', - 'write_to_template': '__version__ = "{version}"'}, + use_scm_version={"local_scheme": "no-local-version"}, setup_requires=["setuptools_scm"], url="https://github.com/BaguaSys/bagua-core", python_requires=">=3.6",