Metadata-Version: 2.4
Name: jiecheng-pkg
Version: 0.1.0
Summary: A tiny factorial toolkit for learning how to publish a package to PyPI (Experiment 3).
Author: QingZhe
License: MIT License
        
        Copyright (c) 2026 QingZhe
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://example.com/jiecheng-pkg
Project-URL: Repository, https://example.com/jiecheng-pkg.git
Keywords: factorial,jiecheng,teaching,experiment
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# jiecheng_pkg

一个用于演示 PyPI 发布流程的极简阶乘包（实验三）。

> 状态：**尚未发布**，仅作为"实验三包"的源码准备，等研究清楚后再上传 PyPI。

## 功能

| 函数 | 说明 |
| --- | --- |
| `jiecheng(n)` | 返回 n 的阶乘（递归实现，n 为正整数） |

## 使用

```python
from jiecheng_pkg import jiecheng

print(jiecheng(5))  # 120
```

## 目录结构

```
实验三_jiecheng_package/
├── jiecheng_pkg/
│   ├── __init__.py
│   └── jiecheng.py
├── tests/
│   └── test_jiecheng.py
├── LICENSE
├── README.md
└── pyproject.toml
```

## 本地测试

在包根目录执行：

```bash
python -m unittest discover -s tests -v
```

## 发布到 PyPI 的步骤（待研究）

1. 在 <https://pypi.org> 注册账号并开启双因素认证。
2. 在 Account settings → API tokens 创建令牌，复制 `pypi-...` 开头的 Token。
3. 安装构建与上传工具：

   ```bash
   pip install build twine
   ```

4. 构建分发包：

   ```bash
   python -m build
   ```

   会生成 `dist/jiecheng_pkg-0.1.0-py3-none-any.whl` 与 `.tar.gz`。

5. 检查并上传（PyPI 已禁用账号密码，必须用 API Token）：

   ```bash
   twine check dist/*
   twine upload -u __token__ -p pypi-你的Token dist/*
   ```

6. 若用 GitHub Actions 等 CI，可改用 Trusted Publishers（OIDC），无需保存 Token。
7. 上传后用 `pip install jiecheng-pkg` 验证，并让同学互相安装测试。
