lxx-jsq 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lxx_jsq-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.5
2
+ Name: lxx-jsq
3
+ Version: 0.0.1
4
+ Summary: 一个简单计算器
5
+ Requires-Python: >=3.8
lxx_jsq-0.0.1/calc.py ADDED
@@ -0,0 +1,16 @@
1
+ def add(a: float, b: float) -> float:
2
+ return a + b
3
+
4
+
5
+ def sub(a: float, b: float) -> float:
6
+ return a - b
7
+
8
+
9
+ def mul(a: float, b: float) -> float:
10
+ return a * b
11
+
12
+
13
+ def div(a: float, b: float) -> float:
14
+ if b == 0:
15
+ raise ValueError("除数不能为 0")
16
+ return a / b
@@ -0,0 +1,14 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "lxx-jsq"
7
+ version = "0.0.1"
8
+ description = "一个简单计算器"
9
+ requires-python = ">=3.8"
10
+ dependencies = []
11
+
12
+ # 关键:因为 calc.py 直接在根目录,需要告诉 hatchling 把它打进 wheel
13
+ [tool.hatch.build.targets.wheel]
14
+ packages = ["calc.py"]