重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
python-packaging by laurigates/claude-plugins
npx skills add https://github.com/laurigates/claude-plugins --skill python-packaging使用 UV 和现代构建工具构建和发布 Python 包的快速参考。
# 构建包
uv build
# 构建特定格式
uv build --wheel
uv build --sdist
# 输出位置:dist/
# 发布到 PyPI
uv publish
# 使用令牌
uv publish --token $PYPI_TOKEN
# 发布到 Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/
my-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│ └── my_package/
│ ├── __init__.py
│ ├── __version__.py
│ └── main.py
└── tests/
[project]
name = "my-package"
version = "0.1.0"
description = "A great package"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "you@example.com"}
]
keywords = ["python", "package"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"requests>=2.31.0",
]
[project.optional-dependencies]
dev = ["pytest", "ruff", "ty"]
[project.urls]
Homepage = "https://github.com/user/my-package"
Documentation = "https://my-package.readthedocs.io"
Repository = "https://github.com/user/my-package.git"
Issues = "https://github.com/user/my-package/issues"
[project.scripts]
my-cli = "my_package.cli:main"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
[project]
version = "0.1.0" # 手动版本管理
# 动态版本管理(从 git 标签获取)
dynamic = ["version"]
[tool.uv]
version-provider = "git"
[project.scripts]
my-cli = "my_package.cli:main"
[project.gui-scripts]
my-gui = "my_package.gui:main"
[project.entry-points."my_plugin"]
plugin1 = "my_package.plugins:plugin1"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[build-system]
requires = ["hatchling>=1.18"]
build-backend = "hatchling.build"
# 1. 构建
uv build
# 2. 检查构建的包
ls dist/
# 3. 发布
uv publish --token $PYPI_TOKEN
# 发布到 Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/ \
--token $TEST_PYPI_TOKEN
# 测试安装
pip install --index-url https://test.pypi.org/simple/ my-package
常用分类器:
classifiers = [
# 开发状态
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
# 受众
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
# 许可证
"License :: OSI Approved :: MIT License",
# Python 版本
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# 框架
"Framework :: Django",
"Framework :: FastAPI",
# 主题
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering",
]
uv-project-management - 项目设置和依赖管理python-development - 核心 Python 模式uv-workspaces - 构建工作区包每周安装量
55
代码仓库
GitHub 星标数
23
首次出现
2026年1月29日
安全审计
安装于
opencode54
github-copilot54
amp53
codex53
kimi-cli53
gemini-cli53
Quick reference for building and publishing Python packages with UV and modern build tools.
# Build package
uv build
# Build specific formats
uv build --wheel
uv build --sdist
# Output location: dist/
# Publish to PyPI
uv publish
# With token
uv publish --token $PYPI_TOKEN
# To Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/
my-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│ └── my_package/
│ ├── __init__.py
│ ├── __version__.py
│ └── main.py
└── tests/
[project]
name = "my-package"
version = "0.1.0"
description = "A great package"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "you@example.com"}
]
keywords = ["python", "package"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"requests>=2.31.0",
]
[project.optional-dependencies]
dev = ["pytest", "ruff", "ty"]
[project.urls]
Homepage = "https://github.com/user/my-package"
Documentation = "https://my-package.readthedocs.io"
Repository = "https://github.com/user/my-package.git"
Issues = "https://github.com/user/my-package/issues"
[project.scripts]
my-cli = "my_package.cli:main"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
[project]
version = "0.1.0" # Manual versioning
# Dynamic versioning (from git tags)
dynamic = ["version"]
[tool.uv]
version-provider = "git"
[project.scripts]
my-cli = "my_package.cli:main"
[project.gui-scripts]
my-gui = "my_package.gui:main"
[project.entry-points."my_plugin"]
plugin1 = "my_package.plugins:plugin1"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[build-system]
requires = ["hatchling>=1.18"]
build-backend = "hatchling.build"
# 1. Build
uv build
# 2. Check built packages
ls dist/
# 3. Publish
uv publish --token $PYPI_TOKEN
# Publish to Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/ \
--token $TEST_PYPI_TOKEN
# Test installation
pip install --index-url https://test.pypi.org/simple/ my-package
Common classifiers:
classifiers = [
# Development Status
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
# Audience
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
# License
"License :: OSI Approved :: MIT License",
# Python Versions
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# Framework
"Framework :: Django",
"Framework :: FastAPI",
# Topic
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering",
]
Full list: https://pypi.org/classifiers/
uv-project-management - Project setup and dependenciespython-development - Core Python patternsuv-workspaces - Building workspace packagesWeekly Installs
55
Repository
GitHub Stars
23
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode54
github-copilot54
amp53
codex53
kimi-cli53
gemini-cli53
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
172,600 周安装
React Spring Physics:基于物理的React动画库教程,实现自然UI动画与手势交互
183 周安装
Docker/Kubernetes容器调试指南:解决启动失败、性能瓶颈与网络问题
181 周安装
Three.js与WebGL开发专家 | 3D网页图形、React Three Fiber(R3F)与GLSL着色器开发
180 周安装
Readwise Reader 读者画像构建技能 - 基于阅读历史分析,实现个性化内容推荐与体验优化
186 周安装
SwiftUI专家技能指南:iOS 26+开发、状态管理与性能优化最佳实践
183 周安装
Stitch DESIGN.md 技能:AI设计系统分析与文档生成工具,提升UI一致性
183 周安装