Ai
1 Star 0 Fork 0

RapidAI/TableStructureRec

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup_table_cls.py 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
无题 提交于 2025-03-19 22:03 +08:00 . chore: add teds score & fix setup package
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: liekkaskono@163.com
import sys
from pathlib import Path
from typing import List, Union
import setuptools
from get_pypi_latest_version import GetPyPiLatestVersion
def read_txt(txt_path: Union[Path, str]) -> List[str]:
with open(txt_path, "r", encoding="utf-8") as f:
data = [v.rstrip("\n") for v in f]
return data
MODULE_NAME = "table_cls"
obtainer = GetPyPiLatestVersion()
try:
latest_version = obtainer(MODULE_NAME)
except Exception:
latest_version = "0.0.0"
VERSION_NUM = obtainer.version_add_one(latest_version)
if len(sys.argv) > 2:
match_str = " ".join(sys.argv[2:])
matched_versions = obtainer.extract_version(match_str)
if matched_versions:
VERSION_NUM = matched_versions
sys.argv = sys.argv[:2]
setuptools.setup(
name=MODULE_NAME,
version=VERSION_NUM,
platforms="Any",
description="A table classifier for further table rec",
long_description="A table classifier that distinguishes between wired and wireless tables",
long_description_content_type="text/markdown",
author="jockerK",
author_email=" xinyijianggo@gmail.com",
url="https://github.com/RapidAI/TableStructureRec",
license="Apache-2.0",
install_requires=read_txt("requirements.txt"),
include_package_data=True,
packages=[MODULE_NAME, f"{MODULE_NAME}.utils"],
keywords=["table-classifier", "wired", "wireless", "table-recognition"],
classifiers=[
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.6,<3.13",
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/RapidAI/TableStructureRec.git
git@gitee.com:RapidAI/TableStructureRec.git
RapidAI
TableStructureRec
TableStructureRec
main

搜索帮助