VENV_DIR = ./venv BUILD_DIR = ./build DIST_DIR = ./dist PYTHON_ARTIFACTS += ./.eggs PYTHON_ARTIFACTS += ./gen_cid.egg-info PYTHON_ARTIFACTS += ./.pytest_cache .PHONY: all build dist dist-egg dist-whl install install-user install-test venv envtest test develop clean clean-all all: install # 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 # Tests if the current environment is able to load the pEp module envtest: python3 -c 'import gen_cid' # Test # ==== # Use these targets only in venv created with 'make venv' install-test: pip3 install .[test] # TODO: maybe use setup.py test? test: pytest # Development develop: pip install -e . # Housekeeping # ============ clean-all: clean rm -rf $(VENV_DIR) clean: rm -rf $(BUILD_DIR) rm -rf $(DIST_DIR) rm -rf $(PYTHON_ARTIFACTS) # Makefile based build of C++ parts only # ====================================== #makefile-build: # $(MAKE) -C src/pEp/_pEp # $(MAKE) -C src/pEp/_pybind # #makefile-clean: # $(MAKE) -C src/pEp/_pEp clean # $(MAKE) -C src/pEp/_pybind clean