Browse Source

Use a __about__.py

pull/298/merge
Florian Mounier 7 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.
"""
__version__ = '2.3.1'
from .__about__ import * # noqa: F401,F403
import pkg_resources
import sys

2
setup.cfg

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

24
setup.py

@ -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
@ -56,18 +55,19 @@ tests_requirements = [
'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'],

Loading…
Cancel
Save