-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
51 lines (42 loc) · 1.33 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup script used to build and install Pysql
@author: Sébastien Renard ([email protected])
@license:GNU GPL V3
"""
from distutils.core import setup
import sys
from os.path import dirname, join
# Languages
langs=["fr"]
data_files=[]
for lang in langs:
data_files.append(["share/locale/%s/LC_MESSAGES/" % lang,
["src/share/locale/%s/LC_MESSAGES/pysql.mo" % lang]])
# Additional files
data_files.append(["share/pysql",
["version", "README", "ChangeLog", "ChangeLog-Synthesis", "LICENSE"]])
# Scripts
scripts=["src/bin/pysql"]
# Version
try:
version=file(join(dirname(__file__), "version")).readline().rstrip().rstrip("\n")
except Exception as e:
print("Warning, cannot read version file (%s)" % e)
print("Defaulting to 'snapshot'")
version="snaphot"
# Windows post install script
if "win" in " ".join(sys.argv[1:]):
scripts.append("pysql_w32_postinst.py")
#Go for setup
setup(name="pysql",
version=version,
description="PySQL is an Oracle enhanced client",
author="Sebastien Renard and Sebastien Delcros",
author_email="[email protected]",
url="http://pysql.sf.net",
package_dir={"pysql" : "src/pysql"},
packages=["pysql"],
scripts=scripts,
data_files=data_files
)