-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
72 lines (62 loc) · 2.07 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
"""Setup module for catkin_tools_fetch."""
import os
import sys
from stat import ST_MODE
from distutils import log
from setuptools import setup
from setuptools.command.install import install
VERSION_STRING = '0.0.6'
PACKAGE_NAME = 'ipb_homework_checker'
# Setup installation dependencies
INSTALL_REQUIRES = [
'ruamel.yaml',
'schema',
'setuptools',
'cpplint',
'datetime',
]
if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
INSTALL_REQUIRES.append('argparse')
class PermissiveInstall(install):
"""A class for permissive install."""
def run(self):
"""Run the install procedure."""
install.run(self)
if os.name == 'posix':
for file in self.get_outputs():
# all installed files should be readable for anybody
mode = ((os.stat(file)[ST_MODE]) | 0o444) & 0o7777
log.info("changing permissions of %s to %o" % (file, mode))
os.chmod(file, mode)
GITHUB_URL = 'https://github.com/PRBonn/{}'.format(PACKAGE_NAME)
setup(
name=PACKAGE_NAME,
packages=[PACKAGE_NAME],
version=VERSION_STRING,
install_requires=INSTALL_REQUIRES,
setup_requires=['nose>=1.0'],
author='Igor Bogoslavskyi',
author_email='[email protected]',
maintainer='Igor Bogoslavskyi',
maintainer_email='[email protected]',
keywords=['ipb', 'homework-checker'],
license="Apache 2.0",
url=GITHUB_URL,
download_url=GITHUB_URL + '/tarball/' + VERSION_STRING,
classifiers=[
'Environment :: Console',
'Programming Language :: Python',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
],
description="""A generic homework checker.""",
long_description=open('README.md').read(),
test_suite='tests',
entry_points={
'console_scripts': [
'check_homework = ipb_homework_checker.check_homework:main',
'print_repo_name = ipb_homework_checker.print_repo_name:main',
],
},
cmdclass={'install': PermissiveInstall},
)