1 Star 0 Fork 0

sam/circuitpython

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
Scott Shawcroft 提交于 2020-05-13 14:45 . Correct version numbering
from datetime import datetime
from setuptools import setup
from pathlib import Path
import subprocess
import re
stub_root = Path("circuitpython-stubs")
stubs = [p.relative_to(stub_root).as_posix() for p in stub_root.glob("*.pyi")]
git_out = subprocess.check_output(["git", "describe", "--tags"])
version = git_out.strip().decode("utf-8")
# Detect a development build and mutate it to be valid semver and valid python version.
pieces = version.split("-")
if len(pieces) > 2:
# Merge the commit portion onto the commit count since the tag.
pieces[-2] += "+" + pieces[-1]
pieces.pop()
# Merge the commit count and build to the pre-release identifier.
pieces[-2] += ".dev." + pieces[-1]
pieces.pop()
version = "-".join(pieces)
setup(
name="circuitpython-stubs",
description="PEP 561 type stubs for CircuitPython",
url="https://github.com/adafruit/circuitpython",
maintainer="CircuitPythonistas",
maintainer_email="circuitpython@adafruit.com",
author_email="circuitpython@adafruit.com",
version=version,
license="MIT",
package_data={"circuitpython-stubs": stubs},
packages=["circuitpython-stubs"],
setup_requires=["setuptools>=38.6.0"],
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/stduino/circuitpython.git
git@gitee.com:stduino/circuitpython.git
stduino
circuitpython
circuitpython
master

搜索帮助