From e2eb03bf6a1b882552630d730be28edf29fc2797 Mon Sep 17 00:00:00 2001 From: Josh Friend Date: Fri, 5 Sep 2014 23:44:12 -0400 Subject: [PATCH 1/2] move some files to .config dir and have makefile create symlinks to them --- .coveragerc => .config/.cofnig | 0 .noserc => .config/.noserc | 0 .project => .config/.project | 0 .pydevproject => .config/.pydevproject | 0 .pylintrc => .config/.pylintrc | 0 .../Foobar.sublime-project | 0 .gitignore | 7 ++++++ Makefile | 23 +++++++++++++++++-- 8 files changed, 28 insertions(+), 2 deletions(-) rename .coveragerc => .config/.cofnig (100%) rename .noserc => .config/.noserc (100%) rename .project => .config/.project (100%) rename .pydevproject => .config/.pydevproject (100%) rename .pylintrc => .config/.pylintrc (100%) rename Foobar.sublime-project => .config/Foobar.sublime-project (100%) diff --git a/.coveragerc b/.config/.cofnig similarity index 100% rename from .coveragerc rename to .config/.cofnig 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..6c9dbef 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,10 @@ dist # Eclipse .settings + +# Symlinks placed in the project root +.coveragerc +.noserc +.project +.pydevproject +Foobar.sublime-project diff --git a/Makefile b/Makefile index 7bb2130..3f3292b 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,13 @@ DEPENDS_CI := $(ENV)/.depends-ci DEPENDS_DEV := $(ENV)/.depends-dev ALL := $(ENV)/.all +CONFIG_FILES = .coveragerc \ + .noserc \ + .project \ + .pydevproject \ + Foobar.sublime-project +CONFIG_DIR = .config + # Main Targets ############################################################### .PHONY: all @@ -73,6 +82,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 +106,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 +200,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 From fdbb04e1f28f354f8a3b763eccc2891a9fad731c Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Sat, 6 Sep 2014 12:10:32 -0400 Subject: [PATCH 2/2] Fix misnamed file, add .pylintrc --- .config/{.cofnig => .coveragerc} | 0 .gitignore | 1 + Makefile | 9 +++++---- 3 files changed, 6 insertions(+), 4 deletions(-) rename .config/{.cofnig => .coveragerc} (100%) diff --git a/.config/.cofnig b/.config/.coveragerc similarity index 100% rename from .config/.cofnig rename to .config/.coveragerc diff --git a/.gitignore b/.gitignore index 6c9dbef..9500379 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ dist .noserc .project .pydevproject +.pylintrc Foobar.sublime-project diff --git a/Makefile b/Makefile index 3f3292b..cfbf266 100644 --- a/Makefile +++ b/Makefile @@ -63,10 +63,11 @@ DEPENDS_DEV := $(ENV)/.depends-dev ALL := $(ENV)/.all CONFIG_FILES = .coveragerc \ - .noserc \ - .project \ - .pydevproject \ - Foobar.sublime-project + .noserc \ + .project \ + .pydevproject \ + .pylintrc \ + Foobar.sublime-project CONFIG_DIR = .config # Main Targets ###############################################################