Giter Site home page Giter Site logo

iamogbz / pyex Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.52 MB

๐Ÿ Create executable from python source

Home Page: https://ogbizi.com/pyex

License: GNU General Public License v3.0

Python 86.60% Makefile 12.35% Shell 1.05%
python executable unix linux nix pyex python-source osx

pyex's Introduction

pyex

Convert folder containing python source code to a single executable file

Build Status Coverage Status

Requirements

A version of Python in your path, preferably Python 3

Install

Clone repository

git clone [email protected]:iamogbz/pyex.git

Build pyex from src using pyex src into your /usr/local/bin directory

DEST='/usr/local/bin' make build

Usage

$ pyex -h
usage: pyex [-h] --output OUTPUT [--install] [--ignore [IGNORE [IGNORE ...]]]
            path

positional arguments:
  path                  path to the python script (folder with __main__.py
                        entry point)

optional arguments:
  -h, --help            show this help message and exit
  -O OUTPUT, --output OUTPUT
                        filename of built executable
  -I, --install         install requirements.txt and include in executable
  -G [IGNORE [IGNORE ...]], --ignore [IGNORE [IGNORE ...]]
                        glob pattern of src files to ignore

First check your code can be executed

python /path/to/directory

If satisfied, build single executable file

pyex /path/to/directory -O /path/to/executable -G "__tests__" "__pycache__" "*.pyc"

Caveats

  1. Requires a __main__.py file in the directory being coverted.
  2. Limited to nix enviroments. See pyinstaller for other usecases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.