[ezt] r33 committed - Add some initial scripts to produce a distribution of EZT, in preparat...

3 views
Skip to first unread message

e...@googlecode.com

unread,
Sep 5, 2011, 9:40:28 PM9/5/11
to ezt-d...@googlegroups.com
Revision: 33
Author: gstein
Date: Mon Sep 5 18:35:03 2011
Log: Add some initial scripts to produce a distribution of EZT, in
preparatino
for loading to the PyPI site.

* setup.py: standard Python setup script.

* dist.sh: invoke setup.py with the right flags. look for bad files.

http://code.google.com/p/ezt/source/detail?r=33

Added:
/trunk/dist.sh
/trunk/setup.py

=======================================
--- /dev/null
+++ /trunk/dist.sh Mon Sep 5 18:35:03 2011
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+python setup.py sdist --formats=bztar,zip
+
+# Sometimes, on Mac OS, we get a "._setup.py" file in the tar, which holds
+# resource fork data. We don't want to see such files in our tarfile.
+tar tjf dist/ezt-*.tar.bz2 | fgrep -q ._ && echo "BAD FILE IN DISTRIBUTION"
=======================================
--- /dev/null
+++ /trunk/setup.py Mon Sep 5 18:35:03 2011
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import distutils.core
+
+# patch distutils if it can't cope with the "classifiers" or
+# "download_url" keywords
+from sys import version
+if version < '2.2.3':
+ import distutils.dist
+ distutils.dist.DistributionMetadata.classifiers = None
+ distutils.dist.DistributionMetadata.download_url = None
+
+for line in open(os.path.join(os.path.dirname(__file__), 'ezt.py')):
+ if line.startswith('__version__'):
+ version = eval(line.split('=')[-1])
+ break
+
+distutils.core.setup(
+ name='ezt',
+ version=version,
+ description='EaZy Templating for Python.',
+ long_description='EZT is a lightweight, fast, and safe templating system
for Python. It is useful for generating HTML, plain text, code, and more.',
+ author='Greg Stein',
+ author_email='gst...@gmai.com',
+ url='http://code.google.com/p/ezt/',
+ py_modules=['ezt'],
+ license='BSD',
+ platforms = 'any',
+ classifiers=[
+ 'Development Status :: 6 - Mature',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Topic :: Software Development :: Code Generators',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ 'Topic :: Software Development :: Pre-processors',
+ 'Programming Language :: Python :: 2',
+ 'Topic :: Text Processing',
+ ],
+ )

Reply all
Reply to author
Forward
0 new messages