|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +# Original libphonenumber Java code: |
| 4 | +# Copyright (C) 2009-2011 The Libphonenumber Authors |
| 5 | +# |
| 6 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +# you may not use this file except in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | + |
| 18 | +import distutils.core |
| 19 | +import sys |
| 20 | +# Importing setuptools adds some features like "setup.py test", but |
| 21 | +# it's optional so swallow the error if it's not there. |
| 22 | +try: |
| 23 | + import setuptools |
| 24 | +except ImportError: |
| 25 | + pass |
| 26 | + |
| 27 | +major, minor = sys.version_info[:2] |
| 28 | +python_25 = (major > 2 or (major == 2 and minor >= 5)) |
| 29 | +if not python_25: |
| 30 | + raise RuntimeError("Python 2.5 or newer is required") |
| 31 | + |
| 32 | +# Discover version of phonenumbers package |
| 33 | +from phonenumbers import __version__ |
| 34 | + |
| 35 | +distutils.core.setup(name='phonenumbers-lite', |
| 36 | + version=__version__, |
| 37 | + description="Python version of Google's common library for parsing, formatting, storing and validating international phone numbers, without (large) per-prefix metadata for geocoding, timezones and carrier info", |
| 38 | + author='David Drysdale', |
| 39 | + author_email='dmd@lurklurk.org', |
| 40 | + url='https://github.com/daviddrysdale/python-phonenumbers', |
| 41 | + license='Apache License 2.0', |
| 42 | + packages=['phonenumbers', 'phonenumbers.data', 'phonenumbers.shortdata'], |
| 43 | + platforms='Posix; MacOS X; Windows', |
| 44 | + classifiers=['Development Status :: 4 - Beta', |
| 45 | + 'Intended Audience :: Developers', |
| 46 | + 'License :: OSI Approved :: Apache Software License', |
| 47 | + 'Operating System :: OS Independent', |
| 48 | + 'Topic :: Communications :: Telephony', |
| 49 | + ], |
| 50 | + ) |
0 commit comments