PackUp is a Python-based command-line tool designed to help you easily package any Python directory into a .whl (wheel) file. It's particularly useful when you need to quickly build a distributable version of a Python project, allowing you to package it with a simple command, no matter where the project is located on your system.
- Automatic
setup.pyGeneration: Automatically creates asetup.pyin the target folder for packaging. - Wheel and Source Distribution: Builds both
.whl(wheel) and source distributions for the provided directory. - Easy to Use: A single command is all you need to package any Python project.
- Portable: Can be installed and used across different Python environments.
These instructions will help you get a copy of PackUp up and running on your local machine for packaging your own Python projects.
To use PackUp, you need Python 3.6 or higher. You can check your Python version by running:
python --versionMake sure you also have pip installed, which comes with most Python installations. Verify it with:
pip --versionTo install PackUp locally, follow these steps:
- Clone the repository to your local machine or download the source code.
- Navigate to the root of the
PackUpproject directory. - Run the following command to install
PackUpglobally on your system:
pip install .Once PackUp is installed, you can package any Python project by simply providing the path to the directory. For example, to package a project located at /path/to/your_project, run:
packup /path/to/your_project- Generate
setup.py:PackUpwill create asetup.pyfile inside the target folder if one does not exist. - Build Distributions: It then runs the standard Python packaging commands to build both the source distribution (
sdist) and the wheel distribution (bdist_wheel). - Resulting Files: The resulting
.whlfile will be stored in thedist/folder inside your project directory.
Here’s a quick example of how to package a project:
packup /path/to/your/python_projectOnce the command finishes, navigate to /path/to/your/python_project/dist/ to find the generated .whl file.
If you're packaging your own Python project, it should have a structure similar to the following:
your_project/
├── your_module/
│ └── __init__.py
├── setup.py (auto-generated by PackUp)
├── README.md
└── LICENSEPackUp will automatically handle the creation of the setup.py file if it doesn't already exist.
By default, PackUp generates a very basic setup.py file with placeholder values. You can edit the generated setup.py to customize it, adding more metadata, dependencies, or specific package configurations as needed.
To uninstall PackUp, simply run:
pip uninstall packupContributions are welcome! If you'd like to contribute to PackUp, please follow these steps:
- Fork the repository.
- Create your feature branch:
git checkout -b feature/AmazingFeature. - Commit your changes:
git commit -m 'Add some AmazingFeature'. - Push to the branch:
git push origin feature/AmazingFeature. - Open a pull request.
Please make sure to update tests as appropriate.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or issues, feel free to contact the project maintainer at:
Email: [email protected] GitHub: https://github.com/jwei2002/PackUp.git