Skip to content

Commit

Permalink
Use a __about__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Jun 1, 2017
1 parent 859277e commit 5976d1a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
15 changes: 15 additions & 0 deletions pygal/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
__title__ = "pygal"
__version__ = "2.3.1"

__summary__ = "A python svg graph plotting library"
__uri__ = "http://pygal.org/"
__author__ = "Florian Mounier"
__email__ = "florian.mounier@kozea.fr"

__license__ = "GNU LGPL v3+"
__copyright__ = "Copyright 2017 %s" % __author__

__all__ = [
'__title__', '__version__', '__summary__', '__uri__', '__author__',
'__email__', '__license__', '__copyright__'
]
3 changes: 1 addition & 2 deletions pygal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
and the maps extensions namespace module.
"""

__version__ = '2.3.1'
from .__about__ import * # noqa: F401,F403

import pkg_resources
import sys
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[wheel]
universal = 1

[tool:pytest]
[pytest]
flake8-ignore =
*.py E731 E402
pygal/__init__.py F401
Expand Down
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import re

from setuptools import setup, find_packages
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand


Expand Down Expand Up @@ -56,18 +55,19 @@ def run_tests(self):
'pytest'
]


with open(os.path.join(ROOT, 'pygal', '__init__.py'), **kwargs) as fd:
__version__ = re.search("__version__ = '([^']+)'", fd.read()).group(1)
about = {}
with open(os.path.join(
os.path.dirname(__file__), "pygal", "__about__.py")) as f:
exec(f.read(), about)

setup(
name="pygal",
version=__version__,
description="A python svg graph plotting library",
author="Kozea",
url="http://pygal.org/",
author_email="florian.mounier@kozea.fr",
license="GNU LGPL v3+",
name=about['__title__'],
version=about['__version__'],
description=about['__summary__'],
url=about['__uri__'],
author=about['__author__'],
author_email=about['__email__'],
license=about['__license__'],
platforms="Any",
packages=find_packages(),
provides=['pygal'],
Expand Down

0 comments on commit 5976d1a

Please sign in to comment.