Commits

Marius Gedminas committed f3d3cdf

Prepare to release v0.2.

Comments (0)

Files changed (7)

+syntax:glob
+*.egg
+.*.swp
 
 # Automatically generated by `hgimportsvn`
 syntax:glob

CHANGELOG

-Dozer Changelog
-===============
-
-0.2 (**tip**)
-* Adding logview that appends log events for the current request to the bottom
-  of the html output for html requests.
-* Adding profiler for request profiling and call tree viewing.
-* Refactored Dozer into its own leak package.
-
-0.1 (June 14, 2008)
-* Initial public release, port from Dowser, a CherryPy tool.
+Dozer Changelog
+===============
+
+0.2 (December 5, 2012)
+----------------------
+* Adding logview that appends log events for the current request to the bottom
+  of the html output for html requests.
+* Adding profiler for request profiling and call tree viewing.
+* Refactored Dozer into its own leak package.
+* New maintainer: Marius Gedminas.
+
+0.1 (June 14, 2008)
+-------------------
+* Initial public release, port from Dowser, a CherryPy tool.
 recursive-include dozer/media *
 recursive-include dozer/templates *
+include README.rst
+include CHANGELOG.rst
 include LICENSE
-include CHANGELOG
+# Which Python interpreter do you want to use
+PYTHON = python
+
+# Directory that will be nuked and created by 'make distcheck'
+TMPDIR = tmp
+
+# Used by make release
+FILE_WITH_VERSION = setup.py
+FILE_WITH_CHANGELOG = CHANGELOG.rst
+
+
+all:
+	# There's nothing that needs building in Dozer.
+
+test:
+	# No tests yet :(
+
+dist:
+	$(PYTHON) setup.py sdist
+
+distcheck:
+	@test -z "`hg status 2>&1`" || \
+	  { echo; echo "Your working tree is not clean" 1>&2; hg status; exit 1; }
+	$(MAKE) dist
+	pkg_and_version=`$(PYTHON) setup.py --name`-`$(PYTHON) setup.py --version` && \
+	  rm -rf $(TMPDIR) && \
+	  mkdir $(TMPDIR) && \
+	  hg archive $(TMPDIR)/tree/ && \
+	  cd $(TMPDIR) && \
+	  tar xvzf ../dist/$$pkg_and_version.tar.gz && \
+	  diff -ur $$pkg_and_version tree -x PKG-INFO -x setup.cfg -x '*.egg-info' && \
+	  cd $$pkg_and_version && \
+	  $(MAKE) dist test && \
+	  cd .. && \
+	  mkdir one two && \
+	  cd one && \
+	  tar xvzf ../../dist/$$pkg_and_version.tar.gz && \
+	  cd ../two/ && \
+	  tar xvzf ../$$pkg_and_version/dist/$$pkg_and_version.tar.gz && \
+	  cd .. && \
+	  diff -ur one two -x SOURCES.txt && \
+	  cd .. && \
+	  rm -rf $(TMPDIR) && \
+	  echo "sdist seems to be ok"
+
+releasechecklist:
+	@$(PYTHON) setup.py --version | grep -qv dev || { \
+	    echo "Please remove the 'dev' suffix from the version number in $(FILE_WITH_VERSION)"; exit 1; }
+	@$(PYTHON) setup.py --long-description | rst2html --exit-status=2 > /dev/null
+	@ver_and_date="`$(PYTHON) setup.py --version` (`echo \`env LC_ALL=C date +'%B %e, %Y'\``)" && \
+	    grep -q "^$$ver_and_date$$" $(FILE_WITH_CHANGELOG) || { \
+	        echo "$(FILE_WITH_CHANGELOG) has no entry for $$ver_and_date"; exit 1; }
+	make distcheck
+
+release: releasechecklist
+	# I'm chicken so I won't actually do these things yet
+	@echo "Please run"
+	@echo
+	@echo "  $(PYTHON) setup.py sdist register upload && hg tag v`$(PYTHON) setup.py --version`"
+	@echo
+	@echo "Please increment the version number in $(FILE_WITH_VERSION)"
+	@echo "and add a new empty entry at the top of the changelog in $(FILE_WITH_CHANGELOG), then"
+	@echo
+	@echo '  hg commit -m "Post-release version bump" && hg push'
+	@echo
+
+
+.PHONY: all test dist distcheck releasechecklist release
+Dozer
+=====
+
+Dozer was originally a WSGI middleware version of Robert Brewer's
+`Dowser CherryPy tool <http://www.aminus.net/wiki/Dowser>`_ that
+displays information as collected by the gc module to assist in
+tracking down memory leaks.  It now also has middleware for profiling
+and for looking at logged messages.
+
+
+Tracking down memory leaks
+--------------------------
+
+Usage::
+
+    from dozer import Dozer
+
+    # my_wsgi_app is a WSGI application
+    wsgi_app = Dozer(my_wsgi_app)
+
+Assuming you're serving your application on the localhost at port 5000,
+you can then load up ``http://localhost:5000/_dozer/index`` to view the
+gc info.
+
+
+Profiling requests
+------------------
+
+Usage::
+
+    from dozer import Profiler
+
+    # my_wsgi_app is a WSGI application
+    wsgi_app = Profiler(my_wsgi_app)
+
+Assuming you're serving your application on the localhost at port 5000,
+you can then load up ``http://localhost:5000/_profiler`` to view the
+list of recorded request profiles.
+
+Here's a blog post by Marius Gedminas that contains `a longer description
+of Dozer's profiler <http://mg.pov.lt/blog/profiling-with-dozer.html>`_.
+
+
+Inspecting log messages
+-----------------------
+
+Usage:
+
+    from dozer import Logview
+
+    # my_wsgi_app is a WSGI application
+    wsgi_app = Logview(my_wsgi_app)
+
+Every text/html page served by your application will get some HTML and
+Javascript injected into the response body listing all logging messages
+produced by the thread that generated this response.
+
+Here's a blog post by Marius Gedminas that contains `a longer description
+of Dozer's logview <http://mg.pov.lt/blog/capturing-logs-with-dozer.html>`_.
+import os
 try:
     from setuptools import setup, find_packages
 except ImportError:
     use_setuptools()
     from setuptools import setup, find_packages
 
+def read(filename):
+    return open(os.path.join(os.path.dirname(__file__), filename)).read()
+
 version = '0.2'
 
 setup(
     name="Dozer",
     version=version,
     description="WSGI Middleware version of the CherryPy memory leak debugger",
-    long_description="""
-Dozer
-=====
-
-Dozer is a WSGI middleware version of Robert Brewer's
-`Dowser CherryPy tool <http://www.aminus.net/wiki/Dowser>`_ that
-displays information as collected by the gc module to assist in
-tracking down memory leaks.
-
-Usage::
-
-    from dozer import Dozer
-
-    # my_wsgi_app is a WSGI application
-    wsgi_app = Dozer(my_wsgi_app)
-
-Assuming you're serving your application on the localhost at port 5000,
-you can then load up ``http://localhost:5000/_dozer/index`` to view the
-gc info.
-
-""",
+    long_description=read('README.rst') + '\n\n' + read('CHANGELOG.rst'),
     keywords='web wsgi memory profiler',
     license='Public Domain',
     author='Ben Bangert',
     author_email='ben@groovie.org',
+    maintainer='Marius Gedminas',
+    maintainer_email='marius@gedmin.as',
     url='http://www.pylonshq.com/',
     packages=find_packages(exclude=['ez_setup']),
     zip_safe=False,