Commits

Victor Stinner committed ba9a225

Add setup.py and COPYING files

  • Participants
  • Parent commits e3b3321

Comments (0)

Files changed (3)

+Copyright 2012 Victor STINNER. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice, this list of
+      conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright notice, this list
+      of conditions and the following disclaimer in the documentation and/or other materials
+      provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY VICTOR STINNER ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VICTOR STINNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of Victor STINNER.

astoptimizer/version.py

+PACKAGE = "astoptimizer"
+VERSION = "0.1"
+WEBSITE = "https://bitbucket.org/haypo/astoptimizer"
+LICENSE = "BSD (2 clauses)"
+
+#!/usr/bin/env python
+
+# Todo list to prepare a release:
+#  - run: ./run_tests.py with Python 2.5, 2.6, 2.7, 3.1, 3.2 and 3.3
+#  - edit astoptimizer/version.py: check/set version
+#  - edit README: set release date
+#  - hg ci
+#  - hg tag astoptimizer-x.y
+#  - hg push
+#  - ./setup.py sdist register upload
+#  - upload the tarball to Python Package Index
+#  - update the website home page (url, md5 and news)
+#
+# After the release:
+#  - edit astoptimizer/version.py: set version to n+1
+#  - edit README: add a new empty section for version n+1
+#  - hg ci
+#  - hg push
+
+from imp import load_source
+from os import path
+
+CLASSIFIERS = [
+    'Intended Audience :: Developers',
+    'Development Status :: 3 - Alpha',
+    'License :: OSI Approved :: BSD License',
+    'Operating System :: OS Independent',
+    'Natural Language :: English',
+    'Programming Language :: Python',
+    'Programming Language :: Python :: 3',
+    'Topic :: Software Development :: Assemblers',
+    'Topic :: Software Development :: Build Tools',
+    'Topic :: Software Development :: Code Generators',
+    'Topic :: Software Development :: Compilers',
+    'Topic :: Software Development :: Libraries :: Python Modules',
+    'Topic :: Software Development :: Pre-processors',
+]
+
+def main():
+    from distutils.core import setup
+
+    metadata = load_source("version", path.join("astoptimizer", "version.py"))
+
+    with open('README') as fp:
+        long_description = fp.read()
+
+    install_options = {
+        "name": metadata.PACKAGE,
+        "version": metadata.VERSION,
+        "url": metadata.WEBSITE,
+        "download_url": metadata.WEBSITE,
+        "author": "Victor Stinner",
+        "description": "Experimental AST optimizer for Python",
+        "long_description": long_description,
+        "classifiers": CLASSIFIERS,
+        "license": metadata.LICENSE,
+        "packages": ["astoptimizer"],
+    }
+
+    setup(**install_options)
+
+if __name__ == "__main__":
+    main()
+
+