Browse Source

convenience target for creating venv that has LD_LIBRARY_PATH set already.

make clean
PYADPT-100
heck 5 years ago
parent
commit
08d1a5b3b5
  1. 28
      Makefile
  2. 6
      Makefile.conf

28
Makefile

@ -22,27 +22,35 @@ dist-whl: compile
dist-egg: compile dist-egg: compile
python3 setup.py bdist_egg python3 setup.py bdist_egg
# Installation # Installation
# ============ # ============
# installs the package system wide # installs the package system wide
install: compile install: compile
python3 setup.py install --force pip3 install .
# installs the package into your user home # installs the package into your user home
install-user: compile install-user: compile
python3 setup.py install --force --user pip3 install . --user
clean: clean-docs clean: clean-docs
rm -r $(BUILD_DIR) rm -rf $(BUILD_DIR)
rm -r $(DIST_DIR) rm -rf $(DIST_DIR)
rm -rf $(PYTHON_ARTIFACTS)
rm -rf $(VERSION_FILE)
rm -rf $(BUILD_INPLACE)
# Creates an ad-hoc dev env using the compiled module # Envrionment
devenv: # ===========
# 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
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: \ bash --rcfile _venv/bin/activate
bash -l
# Tests if the current environment is able to load the pEp module # Tests if the current environment is able to load the pEp module
envtest: envtest:
@ -54,5 +62,5 @@ envtest:
docs: docs:
make html -C docs/ make html -C docs/
clean-docs clean-docs:
make clean -C docs/ make clean -C docs/

6
Makefile.conf

@ -3,6 +3,12 @@ HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
# Constants # Constants
BUILD_DIR = ./build BUILD_DIR = ./build
DIST_DIR = ./dist DIST_DIR = ./dist
VERSION_FILE = ./src/pEp/__version__.py
BUILD_INPLACE = ./src/pEp/_pEp.cpython-38-darwin.so
PYTHON_ARTIFACTS += ./.eggs
PYTHON_ARTIFACTS += ./src/pEp.egg-info
# Build config Defaults # Build config Defaults
DEBUG=0 DEBUG=0

Loading…
Cancel
Save