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.
96 lines
2.0 KiB
96 lines
2.0 KiB
include Makefile.conf
|
|
|
|
.PHONY: all install-pepacidgen gen compile compile-inplace dist dist-egg dist-whl install install-user \
|
|
venv envtest install-test test develop docs clean clean-all clean-docs
|
|
|
|
all: install
|
|
|
|
# Install pEpACIDgen from this repo, not from pypi
|
|
install-pepacidgen:
|
|
pip3 install -r requirements.txt --find-links ../../../dist/
|
|
|
|
# Build
|
|
# =====
|
|
gen: install-pepacidgen
|
|
$(MAKE) -C lib_test gen
|
|
|
|
compile: gen
|
|
python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT)
|
|
|
|
compile-inplace: gen
|
|
python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT) --inplace
|
|
|
|
# Packaging
|
|
# =========
|
|
# create wheel and egg package in dist/
|
|
dist: dist-whl dist-egg
|
|
|
|
# create wheel package in dist/
|
|
dist-whl: compile
|
|
python3 setup.py bdist_wheel
|
|
|
|
# create egg package in dist/
|
|
dist-egg: compile
|
|
python3 setup.py bdist_egg
|
|
|
|
|
|
# Installation
|
|
# ============
|
|
# installs the package system wide
|
|
install: compile
|
|
pip3 install .
|
|
|
|
# installs the package into your user home
|
|
install-user: compile
|
|
pip3 install . --user
|
|
|
|
|
|
# Envrionment
|
|
# ===========
|
|
# Creates and activates a new venv that has the LD_LIBRARY_PATH/DYLD_LIBRARY_PATH
|
|
# already set for the prefix specified in local.conf
|
|
# Only activates venv if already existing
|
|
venv:
|
|
python3 -m venv $(VENV_DIR)
|
|
LD_LIBRARY_PATH=../../lib/lib_test/ \
|
|
DYLD_LIBRARY_PATH=../../lib/lib_test/ \
|
|
bash --rcfile $(VENV_DIR)/bin/activate
|
|
|
|
# Tests if the current environment is able to load the pEp module
|
|
envtest:
|
|
python3 -c 'import lib_test'
|
|
|
|
# Test
|
|
# ====
|
|
# Use these targets only in venv created with 'make venv'
|
|
install-test: compile
|
|
pip3 install .[test]
|
|
|
|
test:
|
|
pytest
|
|
|
|
|
|
# Development
|
|
develop: compile
|
|
pip install -e .
|
|
|
|
# Housekeeping
|
|
# ============
|
|
clean-all: clean
|
|
rm -rf $(VENV_DIR)
|
|
|
|
clean:
|
|
$(MAKE) -C lib_test/ clean-all
|
|
rm -rf $(BUILD_DIR)
|
|
rm -rf $(DIST_DIR)
|
|
rm -rf $(PYTHON_ARTIFACTS)
|
|
rm -rf $(BUILD_INPLACE)
|
|
|
|
|
|
# Makefile based build of C++ parts only
|
|
# ======================================
|
|
makefile-build:
|
|
$(MAKE) -C lib_test/
|
|
|
|
makefile-clean:
|
|
$(MAKE) -C lib_test/ clean
|
|
|