Skip to content

KAS-W/PackUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PackUp

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.

Features

  • Automatic setup.py Generation: Automatically creates a setup.py in 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.

Getting Started

These instructions will help you get a copy of PackUp up and running on your local machine for packaging your own Python projects.

Prerequisites

To use PackUp, you need Python 3.6 or higher. You can check your Python version by running:

python --version

Make sure you also have pip installed, which comes with most Python installations. Verify it with:

pip --version

Installation

To install PackUp locally, follow these steps:

  1. Clone the repository to your local machine or download the source code.
  2. Navigate to the root of the PackUp project directory.
  3. Run the following command to install PackUp globally on your system:
pip install .

Usage

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

How It Works

  1. Generate setup.py: PackUp will create a setup.py file inside the target folder if one does not exist.
  2. Build Distributions: It then runs the standard Python packaging commands to build both the source distribution (sdist) and the wheel distribution (bdist_wheel).
  3. Resulting Files: The resulting .whl file will be stored in the dist/ folder inside your project directory.

Example

Here’s a quick example of how to package a project:

packup /path/to/your/python_project

Once the command finishes, navigate to /path/to/your/python_project/dist/ to find the generated .whl file.

Project Structure

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
└── LICENSE

PackUp will automatically handle the creation of the setup.py file if it doesn't already exist.

Customizing setup.py

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.

Uninstallation

To uninstall PackUp, simply run:

pip uninstall packup

Contributing

Contributions are welcome! If you'd like to contribute to PackUp, please follow these steps:

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feature/AmazingFeature.
  3. Commit your changes: git commit -m 'Add some AmazingFeature'.
  4. Push to the branch: git push origin feature/AmazingFeature.
  5. Open a pull request.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

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

About

packup tools for python to generate .whl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages