This repository was archived by the owner on Aug 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
88 lines (72 loc) · 2.46 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from __future__ import print_function
import os
from setuptools import setup, find_packages
from distutils.command.sdist import sdist
from distutils.command.build_py import build_py
version = '3.1.2.dev0'
class generate_ply_tabs:
def build_ply_tabs(self):
import ply
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(".")))
for path in ("yay/lextab.py", "yay/lextab.pyc", "yay/parsetab.py", "yay/parsetab.pyc"):
if os.path.exists(path):
print("Deleting %s" % path)
os.remove(path)
print("Creating lexer")
from yay.lexer import Lexer
Lexer(optimize=1)
print("Creating parser")
from yay.parser import Parser
Parser()
if not os.path.exists("yay/parsetab.py"):
print("FAILED: parsetab not created")
sys.exit(1)
if not os.path.exists("yay/lextab.py"):
print("FAILED: lextab not created")
sys.exit(1)
class build_py_with_ply(generate_ply_tabs, build_py):
def run(self, *args, **kwargs):
self.build_ply_tabs()
build_py.run(self, *args, **kwargs)
setup(
name='yay',
description='An extensible config file format',
long_description = open("README.rst").read() + "\n" + \
open("CHANGES").read(),
version=version,
url='http://pypi.python.org/pypi/yay',
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: System :: Systems Administration",
],
author='John Carr',
author_email='john.carr@isotoma.com',
license="Apache Software License",
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires = [
"ply",
# "gpglib",
"gevent>=1.0",
],
entry_points = {
'console_scripts': [
'yay = yay.transform:main',
],
},
cmdclass = {
'build_py': build_py_with_ply,
},
)