2014-02-01 12:48:28 +04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from setuptools import setup
|
2014-03-24 11:25:22 +04:00
|
|
|
from setuptools.command.test import test as TestCommand
|
2014-02-03 11:48:38 +04:00
|
|
|
import pyhive
|
2014-03-24 11:25:22 +04:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
class PyTest(TestCommand):
|
|
|
|
def finalize_options(self):
|
|
|
|
TestCommand.finalize_options(self)
|
|
|
|
self.test_args = []
|
|
|
|
self.test_suite = True
|
|
|
|
|
|
|
|
def run_tests(self):
|
2016-05-22 01:58:06 +03:00
|
|
|
# import here, cause outside the eggs aren't loaded
|
2014-03-24 11:25:22 +04:00
|
|
|
import pytest
|
|
|
|
errno = pytest.main(self.test_args)
|
|
|
|
sys.exit(errno)
|
2014-02-01 12:48:28 +04:00
|
|
|
|
2017-08-14 07:47:46 +03:00
|
|
|
|
2014-02-01 13:02:08 +04:00
|
|
|
with open('README.rst') as readme:
|
2014-02-01 12:48:28 +04:00
|
|
|
long_description = readme.read()
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name="PyHive",
|
2014-02-03 11:48:38 +04:00
|
|
|
version=pyhive.__version__,
|
2014-02-01 12:48:28 +04:00
|
|
|
description="Python interface to Hive",
|
|
|
|
long_description=long_description,
|
2014-03-24 11:58:22 +04:00
|
|
|
url='https://github.com/dropbox/PyHive',
|
2014-02-01 12:48:28 +04:00
|
|
|
author="Jing Wang",
|
|
|
|
author_email="jing@dropbox.com",
|
2014-03-24 11:58:22 +04:00
|
|
|
license="Apache License, Version 2.0",
|
2015-07-27 17:01:21 +03:00
|
|
|
packages=['pyhive', 'TCLIService'],
|
2014-02-01 12:48:28 +04:00
|
|
|
classifiers=[
|
2014-03-24 11:58:22 +04:00
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Topic :: Database :: Front-Ends",
|
2014-02-01 12:48:28 +04:00
|
|
|
],
|
2016-03-24 23:02:51 +03:00
|
|
|
install_requires=[
|
|
|
|
'future',
|
Fix the tests and make SQLAlchemy 1.2.8 compatible (#219)
* (More) idiomatic code for `fetchmany`, `fetchall`
I went to look if `fetchall()` downloads th entire result in memory and found that it was coded in a very low-level C style, while Python has a perfectly good idiomatic approach for such things. So I thought I'd submit a fix :-) Take it or leave it, I won't insist.
P.S. I'm editing this from GitHub UI, so haven't run any tests. And although I'm fairly sure it should work as is, consider it formally as a demonstration :-)
* Remove unused import
* Removing unreleased thrift_sasl comment
Hello. I might be removing this prematurely, but `pip search thrift_sasl` now shows 0.3.0. Can this comment be removed?
Also, I filled out the Dropbox Contributor License.
* Add __enter__, __exit__ methods
The methods allow us to use connections and cursors with `with`s
statements.
* Use a setter for arraysize
The reason behind this is that non-integer sizes or None (or 0) do not
make sense.
Especially with None, which might be a common pattern, this should be
prevented as it raises (cryptic) errors on the Thrift size.
* Add script to generate new TCLIService files
* Add decimal/timestamp conversion
* Add the Travis pin
* Fix Flake8 violations
* Add Codecov badge
2018-06-12 03:10:59 +03:00
|
|
|
'python-dateutil',
|
2016-03-24 23:02:51 +03:00
|
|
|
],
|
2014-02-01 12:48:28 +04:00
|
|
|
extras_require={
|
2017-07-08 08:08:18 +03:00
|
|
|
'presto': ['requests>=1.0.0'],
|
|
|
|
'hive': ['sasl>=0.2.1', 'thrift>=0.10.0', 'thrift_sasl>=0.1.0'],
|
2017-09-22 06:13:30 +03:00
|
|
|
'sqlalchemy': ['sqlalchemy>=0.8.7'],
|
2014-02-01 12:48:28 +04:00
|
|
|
},
|
|
|
|
tests_require=[
|
2014-02-02 06:29:40 +04:00
|
|
|
'mock>=1.0.0',
|
2014-03-24 11:25:22 +04:00
|
|
|
'pytest',
|
|
|
|
'pytest-cov',
|
2014-02-02 06:29:40 +04:00
|
|
|
'requests>=1.0.0',
|
2017-04-21 02:27:55 +03:00
|
|
|
'sasl>=0.2.1',
|
Fix the tests and make SQLAlchemy 1.2.8 compatible (#219)
* (More) idiomatic code for `fetchmany`, `fetchall`
I went to look if `fetchall()` downloads th entire result in memory and found that it was coded in a very low-level C style, while Python has a perfectly good idiomatic approach for such things. So I thought I'd submit a fix :-) Take it or leave it, I won't insist.
P.S. I'm editing this from GitHub UI, so haven't run any tests. And although I'm fairly sure it should work as is, consider it formally as a demonstration :-)
* Remove unused import
* Removing unreleased thrift_sasl comment
Hello. I might be removing this prematurely, but `pip search thrift_sasl` now shows 0.3.0. Can this comment be removed?
Also, I filled out the Dropbox Contributor License.
* Add __enter__, __exit__ methods
The methods allow us to use connections and cursors with `with`s
statements.
* Use a setter for arraysize
The reason behind this is that non-integer sizes or None (or 0) do not
make sense.
Especially with None, which might be a common pattern, this should be
prevented as it raises (cryptic) errors on the Thrift size.
* Add script to generate new TCLIService files
* Add decimal/timestamp conversion
* Add the Travis pin
* Fix Flake8 violations
* Add Codecov badge
2018-06-12 03:10:59 +03:00
|
|
|
'sqlalchemy>=0.12.0',
|
2017-09-01 20:38:40 +03:00
|
|
|
'thrift>=0.10.0',
|
2014-02-01 13:08:54 +04:00
|
|
|
],
|
2014-03-24 11:25:22 +04:00
|
|
|
cmdclass={'test': PyTest},
|
2014-02-01 13:08:54 +04:00
|
|
|
package_data={
|
|
|
|
'': ['*.rst'],
|
|
|
|
},
|
2014-02-02 06:29:40 +04:00
|
|
|
entry_points={
|
|
|
|
'sqlalchemy.dialects': [
|
|
|
|
'hive = pyhive.sqlalchemy_hive:HiveDialect',
|
|
|
|
'presto = pyhive.sqlalchemy_presto:PrestoDialect',
|
|
|
|
],
|
|
|
|
}
|
2014-02-01 12:48:28 +04:00
|
|
|
)
|