Added a setup.py for use with setuptools or Distribute.

This particular setup script has been tested with Distribute 0.6.24.
For some strange reason, the generated entry-point script does not work
with Python 3.3 - resulting in import errors. I can only assume this is
a bug in this version of the Distribute package when it's running together
with Python 3.3.
This commit is contained in:
Adam Waldenberg 2013-06-14 03:11:56 +02:00
parent f36b82170f
commit 73c4363f9d
4 changed files with 74 additions and 1 deletions

1
MANIFEST.in Normal file
View file

@ -0,0 +1 @@
include gitinspector/html/*

20
gitinspector/__init__.py Normal file
View file

@ -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 <http://www.gnu.org/licenses/>.
# This file was intentionally left blank.

View file

@ -82,7 +82,7 @@ def __check_python_version__():
python_version = str(sys.version_info[0]) + "." + str(sys.version_info[1]) 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).") sys.exit("gitinspector requires at leat Python 2.6 to run (version " + python_version + " was found).")
if __name__ == "__main__": def main():
__run__ = Runner() __run__ = Runner()
try: try:
@ -140,3 +140,6 @@ if __name__ == "__main__":
__check_python_version__() __check_python_version__()
__run__.output() __run__.output()
if __name__ == "__main__":
main()

49
setup.py Normal file
View file

@ -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 <http://www.gnu.org/licenses/>.
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
)