-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.common
62 lines (53 loc) · 2.35 KB
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Common Makefile variables and targets
PYTHON = python3
PIP = $(PYTHON) -m pip
TWINE = $(PYTHON) -m twine
SOURCE_DIR = src
PYNAUTY_VERSION = $(shell $(PYTHON) -m $(SOURCE_DIR).pynauty pynauty-version)
NAUTY_VERSION = $(shell $(PYTHON) -m $(SOURCE_DIR).pynauty nauty-version)
NAUTY_DIR = $(shell $(PYTHON) -m $(SOURCE_DIR).pynauty nauty-dir)
python_version_full := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
platform := "$(shell uname -a)"
LIBPATH = $(shell echo build/lib.*)
MODULE_TEST = $(PWD)/src/module-test.py
VENV_DIR = .venv-pynauty
export
help:
@echo
@echo 'Available targets for building, testing and (un)installing pynauty:'
@echo
@echo ' pynauty - build the pynauty extension module'
ifdef VIRTUAL_ENV
@echo ' tests - run all tests loading from virtaulenv' $(VIRTUAL_ENV)
else
@echo ' tests - run all tests loading either from build/ or from an active virtualenv'
endif
ifdef VIRTUAL_ENV
@echo ' install - install pynauty into virtualenv' $(VIRTUAL_ENV)
else
@echo ' install - install pynauty either into ~/.local or into an active virtualenv'
endif
ifdef VIRTUAL_ENV
@echo ' uninstall - uninstall pynauty from virtualenv' $(VIRTUAL_ENV)
else
@echo ' uninstall - uninstall pynauty either from ~/.local or from an active virtualenv'
endif
@echo ' tools - install/upgrade required modules for building, testing and packaging'
@echo ' docs - build pyanauty documentation'
@echo ' clean - remove all files created by build/packaging except' $(VENV_DIR)/
@echo ' clean-docs - remove pyanauty documentation'
@echo ' virtenv-create - create virtualenv' $(VENV_DIR)/
@echo ' virtenv-create-global - create virtualenv' $(VENV_DIR)/ with access to the system site-packages
@echo ' virtenv-delete - delete virtualenv' $(VENV_DIR)/
@echo ' nauty-objects - compile only nauty.o nautil.o naugraph.o schreier.o naurng.o'
@echo ' clean-nauty - a "distclean" for nauty'
@echo ' clobber - clean + clean-nauty + clean-docs + virtenv-delete'
@echo
@echo 'Pynauty version:' ${PYNAUTY_VERSION}
@echo 'Nauty version: ' ${NAUTY_VERSION}
@echo 'Python version: ' ${python_version_full}
@echo 'Pip used: ' ${PIP}
@echo 'Platform: ' ${platform}
tools:
$(PIP) install --upgrade --requirement requirements.dist
# vim: filetype=make syntax=make