Byaidu 1 жил өмнө
parent
commit
cc852707fd
2 өөрчлөгдсөн 5 нэмэгдсэн , 17 устгасан
  1. 2 10
      pdf2zh/__init__.py
  2. 3 7
      setup.py

+ 2 - 10
pdf2zh/__init__.py

@@ -1,10 +1,2 @@
-from importlib.metadata import PackageNotFoundError, version
-
-try:
-    __version__ = version("pdf2zh.six")
-except PackageNotFoundError:
-    # package is not installed, return default
-    __version__ = "0.0"
-
-if __name__ == "__main__":
-    print(__version__)
+__version__ = "1.0.0"
+__author__ = "Byaidu"

+ 3 - 7
setup.py

@@ -1,6 +1,5 @@
-import sys
 from pathlib import Path
-
+from pdf2zh import __version__, __author__
 from setuptools import setup
 
 root_dir = Path(__file__).parent
@@ -13,13 +12,10 @@ setup(
     long_description_content_type="text/markdown",
     description="Latex PDF Translator",
     license="MIT",
-    author="Byaidu",
+    version=__version__,
+    author=__author__,
     author_email="byaidux@gmail.com",
     url="https://github.com/Byaidu/PDFMathTranslate",
-    setuptools_git_versioning={
-        "enabled": True,
-    },
-    setup_requires=["setuptools-git-versioning"],
     packages=["pdf2zh"],
     install_requires=[
         "charset-normalizer >= 2.0.0",