diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..f6095cd
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include gitinspector/html/*
diff --git a/gitinspector/__init__.py b/gitinspector/__init__.py
new file mode 100644
index 0000000..354686a
--- /dev/null
+++ b/gitinspector/__init__.py
@@ -0,0 +1,20 @@
+# coding: utf-8
+#
+# Copyright © 2013 Ejwa Software. All rights reserved.
+#
+# This file is part of gitinspector.
+#
+# gitinspector is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# gitinspector is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with gitinspector. If not, see .
+
+# This file was intentionally left blank.
diff --git a/gitinspector/gitinspector.py b/gitinspector/gitinspector.py
index 2ca2706..5bb3895 100755
--- a/gitinspector/gitinspector.py
+++ b/gitinspector/gitinspector.py
@@ -82,7 +82,7 @@ def __check_python_version__():
python_version = str(sys.version_info[0]) + "." + str(sys.version_info[1])
sys.exit("gitinspector requires at leat Python 2.6 to run (version " + python_version + " was found).")
-if __name__ == "__main__":
+def main():
__run__ = Runner()
try:
@@ -140,3 +140,6 @@ if __name__ == "__main__":
__check_python_version__()
__run__.output()
+
+if __name__ == "__main__":
+ main()
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..ee70459
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+#
+# Copyright © 2013 Ejwa Software. All rights reserved.
+#
+# This file is part of gitinspector.
+#
+# gitinspector is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# gitinspector is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with gitinspector. If not, see .
+
+import os
+import sys
+from gitinspector.version import __version__
+from setuptools import setup, find_packages
+
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+setup(
+ name = "gitinspector",
+ version = __version__,
+ author = "Ejwa Software",
+ author_email = "gitinspector@ejwa.se",
+ description = ("A statistical analysis tool for git repositories."),
+ license = "GNU GPL v3",
+ keywords = "analysis analyzer git python statistics stats vc vcs timeline",
+ url = "http://gitinspector.googlecode.com",
+ long_description = read("README.txt"),
+ classifiers = [
+ "Development Status :: 4 - Beta",
+ "Environment :: Console",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
+ "Topic :: Software Development :: Version Control",
+ "Topic :: Utilities"
+ ],
+ packages = find_packages(),
+ entry_points = {"console_scripts": ["gitinspector = gitinspector.gitinspector:main"]},
+ zip_safe = True
+)