You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool for generating and invoking of python sources that does not require installation in python libraries
3
+
4
+
Supports executing code as user and as root (eg as cron tasks). Tooled to leverage a separate python environment from the systems python, therefore allow userland applications to have flexibility of library installation without conflicting with the base systems python environment; as is best practice.
5
+
6
+
7
+
## Applications
8
+
When a project is in alpha state, its often not ready to be packaged in PyPi for the main stream. Secondly, sometimes the process for packaging a python application to make it easy to deploy in production environments can be challenging. This tool offers a bridge to allow tools be be developed and tested without having to deal with packaging and installation by allowing them to be run directly from source.
9
+
10
+
11
+
## Project Install File
12
+
Each project that uses this toolset, will have a <mod>_install.sh in its root file similar to the following:
This above example will deploy an executable called `pynx` to `/usr/bin`, It will also include in PYTHONPATH <project_root>/lib and <project_root>/foo/bar
21
+
22
+
By deploying to `/usr/bin`, the program can be invoked using sudo, which in the case of `pynx`, su is required as its for managing `nginx` and `wsgi`.
| make_mod_exe.sh | (same) | script for generating executable. No modification required |
29
+
| pyinit.sh | (same) | script to set up python environment. Configuration is required |
30
+
31
+
Files are deployed to ~/.py_src_run/
32
+
33
+
Python environment used is suggested to be installed via `pyenv` but virtual env's could be used in theory. Virutal env's have not been tested yet as `pyenv` is the developers prefered mechanism for desktops and production server python deployments.
34
+
35
+
36
+
## src directory
37
+
This design assumes that the python project has a src directory in the root of the file structure as is recommended by most modern documentation on python project setup.
38
+
39
+
40
+
## Installation
41
+
Download the sources
42
+
For each of `py_src_run.sh`, `make_mod_exe.sh` and `pyinit.sh` install by either following instructions in header of each file or run the following in a `bash shell`:
0 commit comments