diff --git a/.coveragerc b/.config/.coveragerc similarity index 100% rename from .coveragerc rename to .config/.coveragerc diff --git a/.noserc b/.config/.noserc similarity index 100% rename from .noserc rename to .config/.noserc diff --git a/.project b/.config/.project similarity index 100% rename from .project rename to .config/.project diff --git a/.pydevproject b/.config/.pydevproject similarity index 100% rename from .pydevproject rename to .config/.pydevproject diff --git a/.pylintrc b/.config/.pylintrc similarity index 100% rename from .pylintrc rename to .config/.pylintrc diff --git a/Foobar.sublime-project b/.config/Foobar.sublime-project similarity index 100% rename from Foobar.sublime-project rename to .config/Foobar.sublime-project diff --git a/.gitignore b/.gitignore index 72e3942..9500379 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,11 @@ dist # Eclipse .settings + +# Symlinks placed in the project root +.coveragerc +.noserc +.project +.pydevproject +.pylintrc +Foobar.sublime-project diff --git a/Makefile b/Makefile index abae942..8e34e61 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,10 @@ ENV := env ifneq ($(findstring win32, $(PLATFORM)), ) BIN := $(ENV)/Scripts OPEN := cmd /c start + LINK := mklink else BIN := $(ENV)/bin + LINK := ln -s ifneq ($(findstring cygwin, $(PLATFORM)), ) OPEN := cygstart else @@ -60,6 +62,14 @@ DEPENDS_CI := $(ENV)/.depends-ci DEPENDS_DEV := $(ENV)/.depends-dev ALL := $(ENV)/.all +CONFIG_FILES = .coveragerc \ + .noserc \ + .project \ + .pydevproject \ + .pylintrc \ + Foobar.sublime-project +CONFIG_DIR = .config + # Main Targets ############################################################### .PHONY: all @@ -73,6 +83,15 @@ ci: pep8 pep257 test tests # Development Installation ################################################### +.PHONY: setup +setup: $(CONFIG_FILES) +$(CONFIG_FILES): + @for f in $(CONFIG_FILES); \ + do \ + echo $(LINK) $(CONFIG_DIR)/$$f $$f; \ + $(LINK) $(CONFIG_DIR)/$$f $$f; \ + done + .PHONY: env env: .virtualenv $(EGG_INFO) $(EGG_INFO): Makefile setup.py requirements.txt @@ -88,13 +107,13 @@ $(PIP): depends: .depends-ci .depends-dev .PHONY: .depends-ci -.depends-ci: env Makefile $(DEPENDS_CI) +.depends-ci: setup env Makefile $(DEPENDS_CI) $(DEPENDS_CI): Makefile $(PIP) install --upgrade pep8 pep257 $(TEST_RUNNER) coverage touch $(DEPENDS_CI) # flag to indicate dependencies are installed .PHONY: .depends-dev -.depends-dev: env Makefile $(DEPENDS_DEV) +.depends-dev: setup env Makefile $(DEPENDS_DEV) $(DEPENDS_DEV): Makefile $(PIP) install --upgrade docutils pdoc pylint wheel touch $(DEPENDS_DEV) # flag to indicate dependencies are installed @@ -182,6 +201,7 @@ tests-pytest: .depends-ci .PHONY: clean clean: .clean-dist .clean-test .clean-doc .clean-build rm -rf $(ALL) + rm -f $(CONFIG_FILES) .PHONY: clean-all clean-all: clean .clean-env