-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
61 lines (51 loc) · 1.75 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
import os
import glob
import wheel
import unittest
from setuptools import setup, Extension, Command
PYRXVM_DIR = 'pyrxvm'
source_files = glob.glob('librxvm/*.c') + ['pyrxvm/pyrxvm.c']
module1 = Extension('rxvm',
define_macros = [('MAJOR_VERSION', '1'),
('MINOR_VERSION', '0')],
include_dirs = ['librxvm'],
sources = source_files)
HERE = os.path.abspath(os.path.dirname(__file__))
README = os.path.join(HERE, os.path.join(PYRXVM_DIR, "README.rst"))
classifiers = [
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Natural Language :: English',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: Education',
'Intended Audience :: Information Technology',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
]
class RunPyRXVMTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
suite = unittest.TestLoader().discover("pyrxvm/test")
t = unittest.TextTestRunner(verbosity=2)
t.run(suite)
with open(README, 'r') as f:
long_description = f.read()
setup(
name = 'rxvm',
version = '1.0.3',
description = ("Non-backtracking regular expression engine with super-fast"
" file searching"),
long_description=long_description,
author = 'Erik Nyquist',
author_email = '[email protected]',
url = 'https://github.com/eriknyquist/librxvm',
package_dir = {'rxvm': PYRXVM_DIR},
cmdclass={'test': RunPyRXVMTests},
ext_modules = [module1]
)