-
Notifications
You must be signed in to change notification settings - Fork 33
/
setup.py
54 lines (46 loc) · 1.59 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
52
53
54
from os.path import dirname, join
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"),
long_description_content_type="text/x-rst",
author="Aryeh Leib Taurog",
author_email="python@aryehleib.com",
license="MIT",
url="https://pgcopy.readthedocs.io/en/latest/",
packages=["pgcopy", "pgcopy.errors", "pgcopy.contrib"],
install_requires=["psycopg2", "pytz"],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Database",
],
)