You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
1.5 KiB
82 lines
1.5 KiB
VENV_DIR = ./venv_pEpACIDgen
|
|
BUILD_DIR = ./build
|
|
DIST_DIR = ./dist
|
|
PYTHON_ARTIFACTS += ./.eggs
|
|
PYTHON_ARTIFACTS += ./pEpACIDgen.egg-info
|
|
PYTHON_ARTIFACTS += ./.pytest_cache
|
|
PYTHON_ARTIFACTS += ./pEpACIDgen/__pycache__
|
|
PYTHON_ARTIFACTS += ./tests/__pycache__
|
|
|
|
|
|
.PHONY: all build dist dist-egg dist-whl install install-user install-test venv envtest test develop examples clean clean-all
|
|
|
|
all: dist example-libs
|
|
|
|
# Build
|
|
# =====
|
|
build:
|
|
python3 setup.py build
|
|
|
|
# Packaging
|
|
# =========
|
|
# create wheel and egg package in dist/
|
|
dist: dist-whl dist-egg
|
|
|
|
# create wheel package in dist/
|
|
dist-whl:
|
|
python3 setup.py bdist_wheel
|
|
|
|
# create egg package in dist/
|
|
dist-egg:
|
|
python3 setup.py bdist_egg
|
|
|
|
|
|
# Installation
|
|
# ============
|
|
# installs the package system wide
|
|
install:
|
|
pip3 install .
|
|
|
|
# installs the package into your user home
|
|
install-user:
|
|
pip3 install . --user
|
|
|
|
|
|
# Envrionment
|
|
# ===========
|
|
# Creates and activates a new venv
|
|
# Only activates venv if already existing
|
|
venv:
|
|
python3 -m venv $(VENV_DIR)
|
|
bash --rcfile $(VENV_DIR)/bin/activate
|
|
|
|
# Test
|
|
# ====
|
|
# Use these targets only in venv created with 'make venv'
|
|
install-test:
|
|
pip3 install .[test]
|
|
|
|
test:
|
|
pytest
|
|
|
|
# Development
|
|
develop:
|
|
pip install -e .
|
|
|
|
|
|
# Examples
|
|
# ========
|
|
# Use these targets only in venv created with 'make venv'
|
|
example-libs:
|
|
$(MAKE) -C examples/lib all
|
|
|
|
# Housekeeping
|
|
# ============
|
|
clean-all: clean
|
|
rm -rf $(VENV_DIR)
|
|
|
|
clean:
|
|
$(MAKE) -C examples/lib clean
|
|
rm -rf $(BUILD_DIR)
|
|
rm -rf $(DIST_DIR)
|
|
rm -rf $(PYTHON_ARTIFACTS)
|
|
|