From 4bbf13e47d8387d0989bed961214d720bba22d9a Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 30 Mar 2017 15:43:30 -0700 Subject: [PATCH 1/2] Cleaning up the release scripts --- firebase_admin/__init__.py | 2 + setup.cfg | 2 + setup.py | 94 ++++++++++---------------------------- 3 files changed, 29 insertions(+), 69 deletions(-) create mode 100644 setup.cfg diff --git a/firebase_admin/__init__.py b/firebase_admin/__init__.py index c12bd1ee5..0ba0b4b13 100644 --- a/firebase_admin/__init__.py +++ b/firebase_admin/__init__.py @@ -6,6 +6,8 @@ from firebase_admin import credentials +__version__ = '0.0.1' + _apps = {} _apps_lock = threading.RLock() diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..2a9acf13d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py index e71c37930..fcf933d71 100644 --- a/setup.py +++ b/setup.py @@ -1,92 +1,48 @@ """Setup file for distribution artifacts.""" +from __future__ import print_function + from os import path -from setuptools import setup, find_packages +import sys + +from setuptools import find_packages +from setuptools import setup + +import firebase_admin + +if sys.version_info < (2, 7): + print('firebase_admin requires python2 version >= 2.7.', file=sys.stderr) + sys.exit(1) -here = path.abspath(path.dirname(__file__)) long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers ' 'to integrate Firebase into their services and applications.') +install_requires = [ + 'oauth2client>=4.0.0', + 'six>=1.6.1' +] + +version = firebase_admin.__version__ setup( name='firebase_admin', - - # Versions should comply with PEP440. For a discussion on single-sourcing - # the version across setup.py and the project code, see - # https://packaging.python.org/en/latest/single_source_version.html - version='0.0.1', - + version=version, description='Firebase Admin Python SDK', long_description=long_description, - url='https://firebase.google.com/docs/admin/setup/', - - # Author details author='Firebase', - - # Choose your license license='https://firebase.google.com/terms/', - - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + keywords='firebase cloud development', + install_requires=install_requires, + packages=find_packages(exclude=['tests']), classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable 'Development Status :: 3 - Alpha', - - # Indicate who your project is intended for 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', - - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.5', ], - - # What does your project relate to? - keywords='firebase cloud development', - - packages=find_packages(exclude=['tests']), - - # List run-time dependencies here. These will be installed by pip when - # your project is installed. For an analysis of "install_requires" vs pip's - # requirements files see: - # https://packaging.python.org/en/latest/requirements.html - install_requires=[ - 'oauth2client>=4.0.0', - 'six>=1.6.1' - ], - - # List additional groups of dependencies here (e.g. development - # dependencies). You can install these using the following syntax, - # for example: - # $ pip install -e .[dev,test] - #extras_require={ - # 'dev': ['check-manifest'], - # 'test': ['coverage'], - #}, - - # If there are data files included in your packages that need to be - # installed, specify them here. If using Python 2.6 or less, then these - # have to be included in MANIFEST.in as well. - #package_data={ - # 'sample': ['package_data.dat'], - #}, - - # Although 'package_data' is the preferred approach, in some case you may - # need to place data files outside of your packages. See: - # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa - # In this case, 'data_file' will be installed into '/my_data' - #data_files=[('my_data', ['data/data_file'])], - - # To provide executable scripts, use entry points in preference to the - # "scripts" keyword. Entry points provide cross-platform support and allow - # pip to create the appropriate form of executable for the target platform. - #entry_points={ - # 'console_scripts': [ - # 'sample=sample:main', - # ], - #}, ) From 5cd1ea69317027fbcaac015fe93b5add41f10f16 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Fri, 31 Mar 2017 11:52:28 -0700 Subject: [PATCH 2/2] Improved text messages and comments --- firebase_admin/__init__.py | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/firebase_admin/__init__.py b/firebase_admin/__init__.py index 0ba0b4b13..601617b26 100644 --- a/firebase_admin/__init__.py +++ b/firebase_admin/__init__.py @@ -6,6 +6,8 @@ from firebase_admin import credentials +# Declaring module version as per https://www.python.org/dev/peps/pep-0396/#specification +# Update this accordingly for each release. __version__ = '0.0.1' _apps = {} diff --git a/setup.py b/setup.py index fcf933d71..b75c982f4 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ if sys.version_info < (2, 7): - print('firebase_admin requires python2 version >= 2.7.', file=sys.stderr) + print('firebase_admin requires python2 version >= 2.7 or python3.', file=sys.stderr) sys.exit(1)