Browse Source

Makefike structure, add targets for docs/sphinx

PYADPT-100
heck 5 years ago
parent
commit
9851fe28b6
  1. 28
      Makefile

28
Makefile

@ -1,9 +1,16 @@
include Makefile.conf include Makefile.conf
.PHONY: all dist dist-egg dist-whl install install-prefix install-sys compile clean devenv envtest .PHONY: all dist dist-egg dist-whl install install-prefix install-sys compile clean devenv envtest docs clean-docs
all: dist all: dist
# Build
# =====
compile:
python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT)
# Packaging
# =========
# create wheel and egg package in dist/ # create wheel and egg package in dist/
dist: dist-whl dist-egg dist: dist-whl dist-egg
@ -15,7 +22,8 @@ dist-whl: compile
dist-egg: compile dist-egg: compile
python3 setup.py bdist_egg python3 setup.py bdist_egg
# Installation
# ============
# installs the package system wide # installs the package system wide
install: compile install: compile
python3 setup.py install --force python3 setup.py install --force
@ -24,19 +32,27 @@ install: compile
install-user: compile install-user: compile
python3 setup.py install --force --user python3 setup.py install --force --user
# build the module into build/
compile:
python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT)
clean: clean: clean-docs
rm -r $(BUILD_DIR) rm -r $(BUILD_DIR)
rm -r $(DIST_DIR) rm -r $(DIST_DIR)
# Creates an ad-hoc dev env using the compiled module
devenv: devenv:
LD_LIBRARY_PATH=$(PREFIX)/lib \ LD_LIBRARY_PATH=$(PREFIX)/lib \
DYLD_LIBRARY_PATH=$(PREFIX)/lib \ DYLD_LIBRARY_PATH=$(PREFIX)/lib \
PYTHONPATH=`pwd`/build/lib.linux-x86_64-3.7:`pwd`/build/lib.macosx-10.9-x86_64-3.8: \ PYTHONPATH=`pwd`/build/lib.linux-x86_64-3.7:`pwd`/build/lib.macosx-10.9-x86_64-3.8: \
bash -l bash -l
# Tests if the current environment is able to load the pEp module
envtest: envtest:
python3 -c 'import pEp' python3 -c 'import pEp'
# Documentation
# =============
docs:
make html -C docs/
clean-docs
make clean -C docs/

Loading…
Cancel
Save