python-packaging
Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.
Author
Category
Development ToolsInstall
Hot:3
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-python-packaging&locale=en&source=copy
Python Packaging - Python Packbuilding and Publishing Guide
Skill Overview
Python Packaging provides complete guidance for creating distributable Python packages, covering project structure,
pyproject.toml configuration, wheel building, and the full PyPI publishing workflow.Use Cases
pipCore Features
__init__.py, README, LICENSE, and morepyproject.toml or setup.py to configure metadata, dependencies, and entry pointssetuptools or modern build tools to generate wheels and source distributions, then upload them to PyPI via twine or other toolsFrequently Asked Questions
How do I publish a Python project to PyPI?
The publishing process includes: preparing the project structure, writing a
pyproject.toml configuration file, using build tools to generate distribution packages, registering an account on PyPI, and using twine to upload the package. For the first release, you must register the package name; for subsequent updates, just increment the version number and upload again.Should I use setup.py or pyproject.toml?
It’s recommended to use
pyproject.toml, the configuration file for Python’s modern packaging standard (PEP 518/621). While setup.py is still widely supported, it is considered an older approach. New projects should prefer pyproject.toml, unless you need compatibility with very old Python versions or use a build backend that hasn’t been migrated yet.What files are needed for Python packaging?
The minimal set of files for packaging includes: the project source code directory,
pyproject.toml (or setup.py), README.md, and LICENSE. It’s also recommended to include: MANIFEST.in (to control packaged content), a tests/ directory, .github/ workflow configurations, and CHANGELOG.md to record version changes.