-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
54 lines (48 loc) · 1.48 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
import os
import re
from setuptools import Extension, find_packages, setup
def read_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_version():
content = read_file('src/limejudge/__init__.py')
regex = r'^__version__ = [\'"]([^\'"]*)[\'"]$'
match = re.search(regex, content, re.M)
if not match:
raise RuntimeError('Cannot find version string in __init__.py')
return match.group(1)
setup(
name='limejudge',
version=get_version(),
description='Simple judge tool for OI contests',
long_description=read_file('README.rst'),
url='https://github.com/infmagic2047/limejudge',
author='Yutao Yuan',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Education',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Topic :: Education',
],
packages=find_packages('src'),
package_dir={'': 'src'},
ext_modules=[
Extension('limejudge.ptrace', ['src/limejudge/ptrace.c']),
],
install_requires=[
'PyYAML',
'docopt',
'termcolor',
],
entry_points={
'console_scripts': [
'limejudge = limejudge.cmdline:main',
],
},
zip_safe=True,
)