Skip to content

Commit 711f032

Browse files
committed
Add gitchart module, fix setup.py
1 parent 294e353 commit 711f032

File tree

4 files changed

+41
-6
lines changed

4 files changed

+41
-6
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Gitchart ChangeLog
22

3+
## Version 2.0.1 (under dev)
4+
5+
- Add `gitchart` module.
6+
37
## Version 2.0.0 (2021-11-24)
48

59
- Drop Python 2 support, Python 3.6 is now required.

gitchart/__init__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright (C) 2013-2021 Sébastien Helleu <[email protected]>
4+
#
5+
# This file is part of Gitchart.
6+
#
7+
# Gitchart is free software; you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation; either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# Gitchart is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with Gitchart. If not, see <https://www.gnu.org/licenses/>.
19+
#
20+
21+
"""Generate statistic charts on Git repositories."""
22+
23+
from gitchart.gitchart import * # noqa

gitchart.py renamed to gitchart/gitchart.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848

4949
import pygal
5050

51-
VERSION = '2.0.0'
51+
__version__ = '2.0.1-dev'
52+
53+
__all__ = (
54+
'__version__',
55+
'main',
56+
)
5257

5358
ISSUES_REGEX_DEFAULT = re.compile(
5459
r'(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)'
@@ -511,7 +516,7 @@ def main():
511516
parser.add_argument(
512517
'-v', '--version',
513518
action='version',
514-
version=VERSION)
519+
version=__version__)
515520
if len(sys.argv) == 1:
516521
parser.print_help()
517522
sys.exit(1)

setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
#
2020

2121
from codecs import open
22-
from setuptools import setup
22+
from setuptools import setup, find_packages
23+
from gitchart import __version__ as gitchart_version
2324

2425
DESCRIPTION = 'Generate statistic charts on Git repositories.'
2526

@@ -28,7 +29,7 @@
2829

2930
setup(
3031
name='gitchart',
31-
version='2.0.0',
32+
version=gitchart_version,
3233
description=DESCRIPTION,
3334
long_description=readme,
3435
long_description_content_type='text/markdown',
@@ -49,8 +50,10 @@
4950
'Programming Language :: Python :: 3',
5051
'Topic :: Software Development :: Version Control',
5152
],
52-
packages=['.'],
53-
install_requires=['pygal'],
53+
packages=find_packages(),
54+
install_requires=[
55+
'pygal',
56+
],
5457
entry_points={
5558
'console_scripts': ['gitchart=gitchart:main'],
5659
}

0 commit comments

Comments
 (0)