This repository was archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·61 lines (49 loc) · 1.95 KB
/
setup.py
File metadata and controls
executable file
·61 lines (49 loc) · 1.95 KB
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
#!/usr/bin/env python3
# ######################################################################
# Copyright (C) 2017 Fridolin Pokorny, fridolin.pokorny@gmail.com
# This file is part of json2sql package.
# ######################################################################
import sys
import os
from setuptools import setup
NAME = 'json2sql'
def get_requirements():
with open('requirements.txt') as fd:
content = fd.read().splitlines()
return [line for line in content if not line.strip().startswith('#')]
def get_version():
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'json2sql', '__init__.py')) as f:
while True:
line = f.readline()
if line.startswith('__version__ = '):
version = line[len('__version__ = ') + 1:-2] # also remove quotes
break
else:
raise ValueError("Cannot parse version information from main __init__.py")
return version
if sys.version_info[0] != 3:
sys.exit("Python3 is required in order to install %s" % NAME)
setup(
name=NAME,
version=get_version(),
packages=[NAME],
scripts=['json2sql-cli'],
install_requires=get_requirements(),
author='Fridolin Pokorny',
author_email='fridolin.pokorny@gmail.com',
maintainer='Fridolin Pokorny',
maintainer_email='fridolin.pokorny@gmail.com',
description='A lightweight Python3 library for describing SQL statements using JSON or dictionary.',
url='https://github.com/fridex/json2sql',
license='ASL 2.0',
keywords='json sql tool converter',
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]
)