Browse Source

Use a __about__.py

pull/298/merge
Florian Mounier 8 years ago
parent
commit
5976d1a2d3
  1. 15
      pygal/__about__.py
  2. 3
      pygal/__init__.py
  3. 2
      setup.cfg
  4. 24
      setup.py

15
pygal/__about__.py

@ -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
pygal/__init__.py

@ -23,8 +23,7 @@ This package holds all available charts in pygal, the Config class
and the maps extensions namespace module. and the maps extensions namespace module.
""" """
from .__about__ import * # noqa: F401,F403
__version__ = '2.3.1'
import pkg_resources import pkg_resources
import sys import sys

2
setup.cfg

@ -1,7 +1,7 @@
[wheel] [wheel]
universal = 1 universal = 1
[tool:pytest] [pytest]
flake8-ignore = flake8-ignore =
*.py E731 E402 *.py E731 E402
pygal/__init__.py F401 pygal/__init__.py F401

24
setup.py

@ -19,9 +19,8 @@
# along with pygal. If not, see <http://www.gnu.org/licenses/>. # along with pygal. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys import sys
import re
from setuptools import setup, find_packages from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand from setuptools.command.test import test as TestCommand
@ -56,18 +55,19 @@ tests_requirements = [
'pytest' 'pytest'
] ]
about = {}
with open(os.path.join(ROOT, 'pygal', '__init__.py'), **kwargs) as fd: with open(os.path.join(
__version__ = re.search("__version__ = '([^']+)'", fd.read()).group(1) os.path.dirname(__file__), "pygal", "__about__.py")) as f:
exec(f.read(), about)
setup( setup(
name="pygal", name=about['__title__'],
version=__version__, version=about['__version__'],
description="A python svg graph plotting library", description=about['__summary__'],
author="Kozea", url=about['__uri__'],
url="http://pygal.org/", author=about['__author__'],
author_email="florian.mounier@kozea.fr", author_email=about['__email__'],
license="GNU LGPL v3+", license=about['__license__'],
platforms="Any", platforms="Any",
packages=find_packages(), packages=find_packages(),
provides=['pygal'], provides=['pygal'],

Loading…
Cancel
Save