|
21 | 21 | from setuptools import find_packages |
22 | 22 | from setuptools import setup |
23 | 23 |
|
24 | | -import firebase_admin |
25 | | - |
26 | 24 |
|
27 | 25 | if sys.version_info < (2, 7): |
28 | 26 | print('firebase_admin requires python2 version >= 2.7 or python3.', file=sys.stderr) |
29 | 27 | sys.exit(1) |
30 | 28 |
|
| 29 | +# Read in the package meta data per recommendations from: |
| 30 | +# https://packaging.python.org/guides/single-sourcing-package-version/ |
| 31 | +about_path = path.join(path.dirname(path.abspath(__file__)), 'firebase_admin', '__about__.py') |
| 32 | +about = {} |
| 33 | +with open(about_path) as fp: |
| 34 | + exec(fp.read(), about) # pylint: disable=exec-used |
| 35 | + |
31 | 36 |
|
32 | 37 | long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers ' |
33 | 38 | 'to integrate Firebase into their services and applications.') |
|
43 | 48 | ':python_version<"3.4"': ('enum34>=1.0.4',), |
44 | 49 | } |
45 | 50 |
|
46 | | -version = firebase_admin.__version__ |
47 | | - |
48 | 51 | setup( |
49 | | - name='firebase_admin', |
50 | | - version=version, |
| 52 | + name=about['__title__'], |
| 53 | + version=about['__version__'], |
51 | 54 | description='Firebase Admin Python SDK', |
52 | 55 | long_description=long_description, |
53 | | - url='https://firebase.google.com/docs/admin/setup/', |
54 | | - author='Firebase', |
55 | | - license='Apache License 2.0', |
| 56 | + url=about['__url__'], |
| 57 | + author=about['__author__'], |
| 58 | + license=about['__license__'], |
56 | 59 | keywords='firebase cloud development', |
57 | 60 | extras_require=extras_require, |
58 | 61 | install_requires=install_requires, |
|
0 commit comments