| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| from __future__ import print_function |
| |
| import io |
| import os |
| import sys |
| |
| from setuptools import setup |
| from setuptools.command.test import test as TestCommand |
| |
| here = os.path.abspath(os.path.dirname(__file__)) |
| |
| def read(*filenames, **kwargs): |
| encoding = kwargs.get('encoding', 'utf-8') |
| sep = kwargs.get('sep', '\n') |
| buf = [] |
| for filename in filenames: |
| with io.open(filename, encoding=encoding) as f: |
| buf.append(f.read()) |
| return sep.join(buf) |
| |
| long_description = read('README.md') |
| |
| class Tox(TestCommand): |
| def finalize_options(self): |
| TestCommand.finalize_options(self) |
| self.test_args = [] |
| self.test_suite = True |
| def run_tests(self): |
| #import here, cause outside the eggs aren't loaded |
| import tox |
| import os |
| del os.environ["PYTHONPATH"] |
| errcode = tox.cmdline(self.test_args) |
| sys.exit(errcode) |
| |
| setup( |
| name='lens-client', |
| version="2.6.1", |
| url='http://github.com/apache/lens/', |
| license='Apache Software License', |
| author='Apache', |
| tests_require=['tox'], |
| install_requires=['requests>=2.9.1', 'six>=1.10.0'], |
| cmdclass={'test': Tox}, |
| author_email='dev@lens.apache.org', |
| description='Python Lens Client', |
| long_description=long_description, |
| packages=['lens', 'lens.client'], |
| include_package_data=True, |
| platforms='any', |
| test_suite='lens.client.test.test_lensclient', |
| classifiers = [ |
| 'Programming Language :: Python', |
| 'Development Status :: 4 - Beta', |
| 'Natural Language :: English', |
| 'Environment :: Web Environment', |
| 'Intended Audience :: Developers', |
| 'License :: OSI Approved :: Apache Software License', |
| 'Operating System :: OS Independent', |
| 'Topic :: Software Development :: Libraries :: Python Modules', |
| 'Topic :: Software Development :: Libraries :: Application Frameworks', |
| 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', |
| ], |
| extras_require={ |
| 'testing': ['pytest'], |
| } |
| ) |