forked from altaurog/pgcopy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
51 lines (47 loc) · 1.65 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from os.path import join, dirname
from setuptools import setup
package_name = "pgcopy"
base_dir = dirname(__file__)
def read(filename):
f = open(join(base_dir, filename))
return f.read()
def get_version(package_name, default='0.1'):
try:
f = open(join(base_dir, package_name, 'version.py'))
except IOError:
try:
f = open(join(base_dir, package_name + '.py'))
except IOError:
return default
for line in f:
parts = line.split()
if parts[:2] == ['__version__', '=']:
return parts[2].strip("'\"")
return default
setup(
name = package_name,
version = get_version(package_name),
description = "Fast db insert with postgresql binary copy",
long_description = read("README.rst") + '\n\n' + read("CHANGELOG.txt"),
author = "Aryeh Leib Taurog",
author_email = "python@aryehleib.com",
license = 'MIT',
url = "https://github.com/altaurog/pgcopy",
packages = [package_name],
install_requires = ["psycopg2-binary", "pytz"],
classifiers = [
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Database",
],
)