-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (63 loc) · 2.02 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8 -*-
"""
@create: 2017-03-09 15:15:05.
@author:
@desc:
"""
# import os
# import sys
# import codecs
# import shutil
from setuptools import setup, find_packages, findall
from pkg_resources import load_entry_point
# print(find_packages())
# print(findall('pydbgen/_templates'))
# print(findall('pydbgen/_proto'))
# print(os.path.join(sys.prefix, 'MyApp', 'CBV'))
# is_py2 = sys.version_info.major == 2
# is_windows = sys.platform.startswith('win')
# def lf2crlf(path, encoding='utf8'):
# with codecs.open(path, 'r', encoding=encoding) as fs:
# data = fs.read()
# with codecs.open(path, 'w', encoding=encoding) as fs:
# data = data.replace('\r', '')
# data = data.replace('\n', '\r\n')
# fs.write(data)
datas = findall('pydbgen/dbbase/_proto')
datas += findall('pydbgen/dbbase/_templates')
datas += findall('pydbgen/pbclass/_proto')
datas += findall('pydbgen/pbclass/_templates')
datas = [i[len('pydbgen/'):] for i in datas]
setup(
name="pydbgen",
version="0.0.5",
install_requires=[
'mako',
'autopep8',
'grpcio-tools',
],
packages=find_packages('.'),
package_data={
'pydbgen': datas,
},
entry_points={
"console_scripts": [
"pydbgen=pydbgen.protoc:main",
"protoc-gen-pydbjson=pydbgen.dbbase.protoc_gen_json:main",
"protoc-gen-pydbmysql=pydbgen.dbbase.protoc_gen_mysql:main",
"protoc-gen-pydbpgsql=pydbgen.dbbase.protoc_gen_pgsql:main",
"protoc-gen-pydbmongo=pydbgen.dbbase.protoc_gen_mongodb:main",
"protoc-gen-pydbtmpl=pydbgen.dbbase.protoc_gen_tmpl_multi:main",
"protoc-gen-pypbjson=pydbgen.pbclass.protoc_gen_json:main",
"protoc-gen-pypbclass=pydbgen.pbclass.protoc_gen_tmpl_multi:main",
]
},
# scripts=bin_list_build(),
python_requires=">=3.6",
author="ppolxda",
author_email="[email protected]",
description="pydbgen",
license="PSF",
keywords="examples",
# url="http://example.com/HelloWorld/",
)