-
Notifications
You must be signed in to change notification settings - Fork 42
/
setup.py
63 lines (53 loc) · 2.09 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
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
# Find mgc version.
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
for line in open(os.path.join(PROJECT_PATH, "proglearn", "__init__.py")):
if line.startswith("__version__ = "):
VERSION = line.strip().split()[2][1:-1]
with open("README.md", mode="r", encoding="utf8") as f:
LONG_DESCRIPTION = f.read()
with open("requirements.txt", mode="r", encoding="utf8") as f:
REQUIREMENTS = f.read()
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
version = "v{}".format(VERSION)
if tag != version:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, version
)
sys.exit(info)
setup(
name="proglearn",
version=VERSION,
author="Will LeVine, Jayanta Dey, Hayden Helm",
author_email="levinewill@icloud.com",
maintainer="Jayanta Dey, Haoyin Xu",
maintainer_email="jdey4@jhmi.edu",
description="A package to implement and extend the methods desribed in 'Omnidirectional Transfer for Quasilinear Lifelong Learning'",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/neurodata/ProgLearn/",
license="MIT",
classifiers=[
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
install_requires=REQUIREMENTS,
packages=find_packages(exclude=["tests", "tests.*", "tests/*"]),
include_package_data=True,
cmdclass={
"verify": VerifyVersionCommand,
},
)