Commits

Andriy Kornatskyy  committed b7b22a3

Initial project structure.

  • Participants

Comments (0)

Files changed (10)

+syntax: glob
+build/
+dist/
+env/
+src/*.egg-info/
+.coverage
+*.pyc
+*.pyo
+doc/_build
+*.mo
+Copyright (C) 2011 by Andriy Kornatskyy
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+include LICENSE README
+.SILENT: clean env po doctest-cover test doc release upload
+.PHONY: clean env po doctest-cover test doc release upload
+
+VERSION=2.7
+PYPI=http://pypi.python.org/simple
+DIST_DIR=dist
+
+PYTHON=env/bin/python$(VERSION)
+EASY_INSTALL=env/bin/easy_install-$(VERSION)
+PYTEST=env/bin/py.test-$(VERSION)
+NOSE=env/bin/nosetests-$(VERSION)
+SPHINX=/usr/bin/python /usr/bin/sphinx-build
+
+all: clean po doctest-cover test release
+
+debian:
+	apt-get -yq update
+	apt-get -yq dist-upgrade
+	# How to Compile Python from Source
+	# http://mindref.blogspot.com/2011/09/compile-python-from-source.html
+	apt-get -yq install libbz2-dev build-essential python \
+		python-dev python-setuptools python-virtualenv \
+		python-shpinx mercurial
+
+env:
+	PYTHON_EXE=/usr/local/bin/python$(VERSION); \
+	if [ ! -x $$PYTHON_EXE ]; then \
+		PYTHON_EXE=/usr/bin/python$(VERSION); \
+	fi;\
+	VIRTUALENV_USE_SETUPTOOLS=1; \
+	export VIRTUALENV_USE_SETUPTOOLS; \
+	virtualenv --python=$$PYTHON_EXE \
+		--no-site-packages env
+	if [ "$$(echo $(VERSION) | sed 's/\.//')" -ge 30 ]; then \
+		echo -n 'Upgrading distribute...'; \
+		$(EASY_INSTALL) -i $(PYPI) -U -O2 distribute \
+			> /dev/null 2>/dev/null; \
+		echo 'done.'; \
+	fi
+	$(EASY_INSTALL) -i $(PYPI) -O2 coverage nose pytest \
+		pytest-pep8 pytest-cov
+	# The following packages available for python < 3.0
+	#if [ "$$(echo $(VERSION) | sed 's/\.//')" -lt 30 ]; then \
+	#	$(EASY_INSTALL) sphinx; \
+	#fi
+	$(PYTHON) setup.py develop -i $(PYPI)
+
+clean:
+	find src/ -type d -name __pycache__ | xargs rm -rf
+	find src/ -name '*.py[co]' -delete
+	rm -rf dist/ build/ MANIFEST src/*.egg-info
+
+release:
+	$(PYTHON) setup.py -q bdist_egg
+
+upload:
+	REV=$$(hg head --template '{rev}');\
+	if [ "$$(echo $(VERSION) | sed 's/\.//')" -eq 27 ]; then \
+		$(PYTHON) setup.py -q egg_info --tag-build .$$REV \
+			sdist register upload; \
+		$(EASY_INSTALL) -i $(PYPI) sphinx; \
+		$(PYTHON) env/bin/sphinx-build -D release=0.1.$$REV \
+			-a -b html doc/ doc/_build/;\
+		python setup.py upload_docs; \
+	fi; \
+	$(PYTHON) setup.py -q egg_info --tag-build .$$REV \
+		bdist_egg --dist-dir=$(DIST_DIR) \
+		rotate --match=$(VERSION).egg --keep=1 --dist-dir=$(DIST_DIR) \
+		upload;
+
+test:
+	$(PYTEST) -q -x --pep8 --doctest-modules \
+		src/wheezy/template
+
+doctest-cover:
+	$(NOSE) --stop --with-doctest --detailed-errors \
+		--with-coverage --cover-package=wheezy.template
+
+test-cover:
+	$(PYTEST) -q --cov wheezy.template \
+		--cov-report term-missing \
+		src/wheezy/template
+
+doc:
+	$(SPHINX) -a -b html doc/ doc/_build/
+
+test-demos:
+	$(PYTEST) -q -x --pep8 demos/
+`wheezy.template`_ is a `python`_ package written in pure Python
+code. It is a lightweight template library.
+
+It is optimized for performance, well tested and documented.
+
+Resources:
+
+* `source code`_, `examples`_ and `issues`_ tracker are available
+  on `bitbucket`_
+* `documentation`_, `readthedocs`_
+* `eggs`_ on `pypi`_
+
+Install
+-------
+
+`wheezy.template`_ requires `python`_ version 2.4 to 2.7 or 3.2.
+It is independent of operating system. You can install it from `pypi`_
+site using `setuptools`_::
+
+    $ easy_install wheezy.template
+
+If you are using `virtualenv`_::
+
+    $ virtualenv env
+    $ env/bin/easy_install wheezy.template
+
+If you run into any issue or have comments, go ahead and add on
+`bitbucket`_.
+
+.. _`bitbucket`: http://bitbucket.org/akorn/wheezy.template
+.. _`doctest`: http://docs.python.org/library/doctest.html
+.. _`documentation`: http://packages.python.org/wheezy.template
+.. _`eggs`: http://pypi.python.org/pypi/wheezy.template
+.. _`examples`: http://bitbucket.org/akorn/wheezy.template/src/tip/demos
+.. _`issues`: http://bitbucket.org/akorn/wheezy.template/issues
+.. _`pypi`: http://pypi.python.org/pypi/wheezy.template
+.. _`python`: http://www.python.org
+.. _`readthedocs`: http://readthedocs.org/builds/wheezyhtml
+.. _`setuptools`: http://pypi.python.org/pypi/setuptools
+.. _`source code`: http://bitbucket.org/akorn/wheezy.template/src
+.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv
+.. _`wheezy.template`: http://pypi.python.org/pypi/wheezy.template
+[egg_info]
+tag_build=
+tag_date=0
+tag_svn_revision=0
+
+[bdist_egg]
+exclude-source-files=0
+
+[upload_docs]
+upload-dir = doc/_build
+
+[pytest]
+#!/usr/bin/env python
+
+import os
+
+try:
+    from setuptools import setup
+except:
+    from distutils.core import setup
+
+README = open(os.path.join(os.path.dirname(__file__), 'README')).read()
+
+setup(
+    name='wheezy.template',
+    version='0.1',
+    description='A lightweight template library',
+    long_description=README,
+    url='https://bitbucket.org/akorn/wheezy.template',
+
+    author='Andriy Kornatskyy',
+    author_email='andriy.kornatskyy at live.com',
+
+    license='MIT',
+    classifiers=[
+        'Development Status :: 4 - Beta',
+        'Environment :: Web Environment',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: MIT License',
+        'Natural Language :: English',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.4',
+        'Programming Language :: Python :: 2.5',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 3.2',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
+        'Topic :: Internet :: WWW/HTTP',
+        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'Topic :: Software Development :: Widget Sets',
+        'Topic :: Text Processing :: Markup :: HTML'
+    ],
+    keywords='html widget markup template preprocessor',
+    packages=['wheezy', 'wheezy.template', 'wheezy.template'],
+    package_dir={'': 'src'},
+    namespace_packages=['wheezy'],
+
+    zip_safe=False,
+    install_requires=[
+    ],
+    extras_require={
+        'dev': [
+            'coverage',
+            'nose',
+            'pytest',
+            'pytest-pep8',
+            'pytest-cov',
+        ],
+    },
+
+    platforms='any'
+)

File src/wheezy/__init__.py

+# See
+# http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)

File src/wheezy/template/__init__.py

Empty file added.

File src/wheezy/template/tests/__init__.py

Empty file added.