-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
73 lines (63 loc) · 2.1 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
import os
import sys
from stat import ST_MODE
from distutils import log
from setuptools import setup
from setuptools import find_packages
from setuptools.command.install import install
VERSION_STRING = "2.0.0"
PACKAGE_NAME = "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/cpp-for-yourself/{}".format(PACKAGE_NAME)
setup(
name=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=["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(),
long_description_content_type='text/markdown',
test_suite="tests",
packages=find_packages(),
entry_points={
"console_scripts": [
"check_homework = homework_checker.check_homework:main",
"print_repo_name = homework_checker.print_repo_name:main",
],
},
cmdclass={"install": PermissiveInstall},
)