Skip to content
Browse files

Add window build support

  • Loading branch information...
1 parent 655fe26 commit f2bf7baba907ce3d491557554ecd2249c7953183 @bcui6611 bcui6611 committed Aug 21, 2012
Showing with 51 additions and 0 deletions.
  1. +45 −0 Makefile.mingw
  2. +6 −0 dist_setup.py
View
45 Makefile.mingw
@@ -0,0 +1,45 @@
+TMP_DIR = ./tmp
+TMP_VER = $(TMP_DIR)/version_num.tmp
+PROJECT_NAME = cbhealthchecker
+
+BINARIES = dist/$(PROJECT_NAME).exe
+PYTHON = /cygdrive/c/Python26/python.exe
+OBJDIR = dist
+
+all: clean install
+
+install: ${BINARIES}
+ test -d $(TMP_DIR) || mkdir $(TMP_DIR)
+ git describe | sed s/-/_/g > $(TMP_VER)
+ rm -f ./$(PROJECT_NAME)_*.tar.gz
+ mkdir -p $(TMP_DIR)/$(PROJECT_NAME)
+ cp -rf $(OBJDIR)/*.* reports LICENSE $(TMP_DIR)/$(PROJECT_NAME)
+ cp $(TMP_VER) $(TMP_DIR)/$(PROJECT_NAME)/VERSION.txt
+ (cd $(TMP_DIR); tar cf - $(PROJECT_NAME)) | gzip -9 > $(PROJECT_NAME)-`cat $(TMP_VER)`.tar.gz
+ rm -rf $(TMP_DIR)
+
+SRC = \
+ analyzer.py \
+ bucket_stats.py \
+ buckets.py \
+ cluster_stats.py \
+ collector.py \
+ diskqueue_stats.py \
+ info.py \
+ listservers.py \
+ mc_bin_client.py \
+ memcacheConstants.py \
+ node_stats.py \
+ prescription.py \
+ restclient.py \
+ stats_buffer.py \
+ threshold.py \
+ usage.py \
+ util_cli.py
+
+dist/$(PROJECT_NAME).exe: $(SRC)
+ $(PYTHON) dist_setup.py py2exe
+
+clean:
+ $(RM) -rf ${OBJDIR}
+ $(RM) -rf $(TMP_DIR)
View
6 dist_setup.py
@@ -0,0 +1,6 @@
+from distutils.core import setup
+import py2exe
+
+setup(console=['cbhealthchecker'],
+ options={'py2exe': {'bundle_files': 1}},
+ zipfile=None)

0 comments on commit f2bf7ba

Please sign in to comment.
Something went wrong with that request. Please try again.