{"id":16983917,"url":"https://github.com/tusharsadhwani/packaged","last_synced_at":"2025-04-06T01:08:55.711Z","repository":{"id":238930157,"uuid":"797987552","full_name":"tusharsadhwani/packaged","owner":"tusharsadhwani","description":"The easiest way to ship python applications.","archived":false,"fork":false,"pushed_at":"2024-06-28T11:25:57.000Z","size":243,"stargazers_count":193,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-25T09:17:47.228Z","etag":null,"topics":["packaging","python"],"latest_commit_sha":null,"homepage":"https://packaged.live","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tusharsadhwani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-08T21:46:44.000Z","updated_at":"2024-10-30T01:55:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdad5c27-f2f2-46a0-83ae-1c97439ba230","html_url":"https://github.com/tusharsadhwani/packaged","commit_stats":{"total_commits":66,"total_committers":2,"mean_commits":33.0,"dds":"0.015151515151515138","last_synced_commit":"8242749e0785fdbb1168cbbbf4f06b5608aca11b"},"previous_names":["tusharsadhwani/packaged"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharsadhwani%2Fpackaged","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharsadhwani%2Fpackaged/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharsadhwani%2Fpackaged/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusharsadhwani%2Fpackaged/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tusharsadhwani","download_url":"https://codeload.github.com/tusharsadhwani/packaged/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["packaging","python"],"created_at":"2024-10-14T02:29:40.610Z","updated_at":"2025-04-06T01:08:55.688Z","avatar_url":"https://github.com/tusharsadhwani.png","language":"Shell","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"# packaged\n\nThe easiest way to ship python applications.\n\n### Demo apps available on the website: [packaged.live](https://packaged.live)\n\n![Demo](https://raw.githubusercontent.com/tusharsadhwani/packaged/main/demo.jpg)\n\n`packaged` can take any Python project, and package it into a self contained\nexecutable, that can run on other machines without needing Python installed.\n\n## Installation\n\n```bash\npip install packaged\n```\n\n## Usage\n\n```bash\npackaged \u003coutput_path\u003e \u003cbuild_command\u003e \u003cstartup_command\u003e [\u003csource_directory\u003e] [--python-version=3.12]\n```\n\nSuch as:\n\n```bash\npackaged my_project.sh 'pip install .' 'python -m your_package' path/to/project\n```\n\nThis will package Python 3.12 with your application by default.\n\nTo specify a different Python version, use the `--python-version` flag, like so:\n\n```bash\npackaged my_project.sh 'pip install .' 'python -m your_package' path/to/project --python-version=3.10\n```\n\n## Examples\n\nAll examples below create a self contained executable. You can send the produced\nbinary file to another machine with the same OS and architecture, and it will\nrun the same.\n\nYou can also find the pre-built binaries on the [Releases page](https://github.com/tusharsadhwani/packaged/releases/latest).\n\n### Mandelbrot (`numpy`, `matplotlib`, GUI)\n\n```bash\npackaged ./mandelbrot.sh 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot --python-version=3.10\n```\n\nThis produces a `./mandelbrot.sh` binary with:\n\n- Python 3.10\n- `matplotlib`\n- `numba`\n- `llvmlite`\n- `pillow`\n\nThat outputs an interactive mandelbrot set GUI.\n\n### Minesweeper (using `packaged.toml` for configuration)\n\nYou can use a `packaged.toml` file and simply do `packaged path/to/project` to\ncreate your package. For example, try the `minesweeper` project:\n\n```bash\npackaged ./example/minesweeper\n```\n\n[This configuration](https://github.com/tusharsadhwani/packaged/blob/main/example/minesweeper/packaged.toml)\nis used for building the package. The equivalent command to build the project\nwithout `pyproject.toml` would be:\n\n```bash\npackaged minesweeper.sh 'pip install .' 'python -m minesweeper' ./example/minesweeper\n```\n\n### Posting (TUI based API testing app)\n\nPosting is a Postman alternative that runs entirely in the terminal. A perfect\ncandidate to build an executable out of!\n\nSince the dependencies themselves contain all the source code needed, you can\nskip the last argument. With this, no other files will be packaged other than\nwhat is produced in the build step.\n\n```bash\npackaged ./posting.sh 'pip install posting' 'posting'\n```\n\nThis will simply package the `posting` app into a single file.\n\n### Aliens (pygame)\n\nPygame ships with various games as well, `pygame.examples.aliens` is one of them:\n\n```bash\npackaged ./aliens 'pip install pygame' 'python -m pygame.examples.aliens'\n```\n\nAnother one that you can try out is `pygame.examples.chimp`.\n\n### IPython (console scripts)\n\nPackages that expose shell scripts (like `ipython`) should also just work when\ncreating a package, and these scripts can be used as the startup command:\n\n```bash\npackaged ./ipython 'pip install ipython' 'ipython'\n```\n\nNow running `./ipython` runs a portable version of IPython!\n\n## Local Development / Testing\n\nTo test and modify the package locally:\n\n- Create and activate a virtual environment\n- Run `pip install -r requirements-dev.txt` to do an editable install\n- Run `pytest` to run tests\n- Make changes as needed\n\n### Type Checking\n\nRun `mypy .`\n\n### Create and upload a package to PyPI\n\nMake sure to bump the version in `setup.cfg`.\n\nThen run the following commands:\n\n```bash\nrm -rf build dist\npython setup.py sdist bdist_wheel\n```\n\nThen upload it to PyPI using [twine](https://twine.readthedocs.io/en/latest/#installation):\n\n```bash\ntwine upload dist/*\n```\n\n## License\n\nThe package is Licensed under GNU General Public License v2 (GPLv2). However,\nnote that **the packages created with `packaged` are NOT licensed under GPL**.\nThis is because the archives created are just data for the package, and\n`packaged` is not a part of the archives created.\n\nThat means that you can freely use `packaged` for commercial use.\n\nRead the [License section for Makeself](https://github.com/megastep/makeself?tab=readme-ov-file#license) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharsadhwani%2Fpackaged","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftusharsadhwani%2Fpackaged","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusharsadhwani%2Fpackaged/lists"}