Commits

Jason Moiron committed a28d22c

fix year in LICENSE template, fix setup.py to include the correct package data so it can be installed from hg

  • Participants
  • Parent commits 8ff2400

Comments (0)

Files changed (2)

paster-templates/base_package/LICENCE_tmpl

 {{if license == 'MIT'}}
-Copyright (c) 2007{{if author}} {{author}} and Contributors{{endif}}
+Copyright (c) 2010{{if author}} {{author}} and Contributors{{endif}}
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 
 version = '0.1'
 
-setup(
-    name='paster-templates',
-    version=version,
-    description="paster templates",
-    long_description="""\
-    paster templates for jmoiron""",
-    classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
-    keywords='paste paster',
-    author='Jason Moiron',
-    author_email='jmoiron@jmoiron.net',
-    url='http://bitbucket.org/jmoiron/paster-templates/',
-    license='MIT',
-    packages=[],
-    py_modules=['templates'],
-    include_package_data=True,
-    zip_safe=False,
-    install_requires=[
-        'Paste>=1.3',
-        'PasteScript',
-      # -*- Extra requirements: -*-
-    ],
-    entry_points="""
-    # -*- Entry points: -*-
-    [paste.paster_create_template]
-    vanilla=templates:BasePackage
-    django=templates:DjangoPackage
-    """,
-)
+def find_package_data(path):
+    """Return a list of all files under a path."""
+    data_files = []
+    def finder(arg, dir, files):
+        dirfiles = []
+        for file in files:
+            full = os.path.join(dir, file)
+            if not os.path.isdir(full):
+                dirfiles.append(full)
+        data_files.append((dir, dirfiles))
+    os.path.walk(path, finder, None)
+    return data_files
 
+if __name__ == '__main__':
+    setup(
+        name='paster-templates',
+        version=version,
+        description="paster templates",
+        long_description="""\
+        paster templates for jmoiron""",
+        classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+        keywords='paste paster',
+        author='Jason Moiron',
+        author_email='jmoiron@jmoiron.net',
+        url='http://bitbucket.org/jmoiron/paster-templates/',
+        license='MIT',
+        py_modules=['templates'],
+        include_package_data=True,
+        zip_safe=False,
+        packages=[],
+        data_files = find_package_data('paster-templates/base_package'),
+        install_requires=[
+            'Paste>=1.3',
+            'PasteScript',
+          # -*- Extra requirements: -*-
+        ],
+        entry_points="""
+        # -*- Entry points: -*-
+        [paste.paster_create_template]
+        vanilla=templates:BasePackage
+        django=templates:DjangoPackage
+        """,
+    )
+