diff --git a/ChangeLog.md b/ChangeLog.md index b88e08b..473c483 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ # Gitchart ChangeLog +## Version 2.0.1 (under dev) + +- Add `gitchart` module. + ## Version 2.0.0 (2021-11-24) - Drop Python 2 support, Python 3.6 is now required. diff --git a/gitchart/__init__.py b/gitchart/__init__.py new file mode 100644 index 0000000..5746778 --- /dev/null +++ b/gitchart/__init__.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2013-2021 Sébastien Helleu +# +# This file is part of Gitchart. +# +# Gitchart 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. +# +# Gitchart 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 Gitchart. If not, see . +# + +"""Generate statistic charts on Git repositories.""" + +from gitchart.gitchart import * # noqa diff --git a/gitchart.py b/gitchart/gitchart.py similarity index 99% rename from gitchart.py rename to gitchart/gitchart.py index 7e4dd7b..f50cd13 100755 --- a/gitchart.py +++ b/gitchart/gitchart.py @@ -48,7 +48,12 @@ import pygal -VERSION = '2.0.0' +__version__ = '2.0.1-dev' + +__all__ = ( + '__version__', + 'main', +) ISSUES_REGEX_DEFAULT = re.compile( r'(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)' @@ -511,7 +516,7 @@ def main(): parser.add_argument( '-v', '--version', action='version', - version=VERSION) + version=__version__) if len(sys.argv) == 1: parser.print_help() sys.exit(1) diff --git a/setup.py b/setup.py index 5d6c46e..0a11d6b 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,8 @@ # from codecs import open -from setuptools import setup +from setuptools import setup, find_packages +from gitchart import __version__ as gitchart_version DESCRIPTION = 'Generate statistic charts on Git repositories.' @@ -28,7 +29,7 @@ setup( name='gitchart', - version='2.0.0', + version=gitchart_version, description=DESCRIPTION, long_description=readme, long_description_content_type='text/markdown', @@ -49,8 +50,10 @@ 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Version Control', ], - packages=['.'], - install_requires=['pygal'], + packages=find_packages(), + install_requires=[ + 'pygal', + ], entry_points={ 'console_scripts': ['gitchart=gitchart:main'], }