Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eagafonov/supermake
Supermakefile to be used with python projects
https://github.com/eagafonov/supermake
Last synced: 3 days ago
JSON representation
Supermakefile to be used with python projects
- Host: GitHub
- URL: https://github.com/eagafonov/supermake
- Owner: eagafonov
- License: mit
- Created: 2014-03-07T10:37:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T12:17:46.000Z (about 3 years ago)
- Last Synced: 2024-04-17T20:15:31.228Z (7 months ago)
- Language: Makefile
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
Supermake
=========A set of makefiles to create supermakefile.
Install
-------Simplest way is to use `git submodule` to checkout `supermake` in subfolder folder.
#> git submodule add https://github.com/eagafonov/supermake
#> git commit -m "Add supermake submodule"Minimal supermake file
----------------------Here is an example of minimal supermakefile to use sandbox
all:
include supermake/python-sandbox.mk
Note that default target `all` is placed before any includeModules
=======python-sandbox
--------------This module contains variouse stuff con setup local sandobox evironment
### How to enable
include supermake/python-sandbox.py
### targets
#### sandbox
Setup fresh sandbox in `$(SANDBOX_DIR)` if not exists. It need not to be invoked directly but must be mentioned here
#### shell
Run interactive shell in sandbox
#### install-requirements
Install dependencies from `requirements.txt` with `pip install -r requirements.txt`.
requirements.txt must exists otherwize the tartget fails.#### freeze
Save currently installed packages into `requirements-freezed.txt` with `pip freeze` (https://pip.pypa.io/en/latest/reference/pip_freeze.html)
#### install-requirements-freezed
Install freezed requirements from `requirements-freezed.txt`
#### check-sandbox
Helper target to make sure sandbox is active.
Fails if invoked not in sandboxUsage example:
must_run_in_sandbox: check-sandbox
echo "Sandbox is OK"#### pip-install-%
template target to install package
For example, we need to install pytest to run tests but need not to install it in production environement so
lets install it before tests is invokedcheck: pip-install-pytest
$(SANDBOX) pytest --ignore=sandbox### Configuration variables
* PYTHON - python binary to use. Defaul is `python`. Set to `python3` to enforce fresh Python3 or `python2.6` to stick on old crap.
* SANDBOX_DIR - Path where sandbox will be installed. Default is `$(shell pwd)/sandbox`### Other useful variable
#### SANDBOX
command prefix to run it the command on sandbox. Default is `source $(SANDBOX_DIR)/bin/activate &&`.
So `$(SANDBOX) python runme.py` is expanded into `source $(SANDBOX_DIR)/bin/activate && python runme.py`#### VIRTUALENV
Command to setup sandbox. Default is `$(PYTHON) -m virtualenv --no-site-packages`