-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
47 lines (37 loc) · 1.37 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
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = "0.2.1"
DESCRIPTION = open("README.md", encoding="utf-8").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")
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(tag, VERSION)
sys.exit(info)
setup(
name="shortener",
version=VERSION,
packages=find_packages(exclude=["tests"]),
url="https://github.com/pennlabs/shortener",
project_urls={"Changelog": ("https://github.com/pennlabs/shortener/blob/master/CHANGELOG.md")},
license="MIT",
author="Penn Labs",
author_email="admin@pennlabs.org",
description="URL shortener in django",
long_description=DESCRIPTION,
long_description_content_type="text/markdown",
install_requires=["django>=2.0.0"],
classifiers=[
"Framework :: Django",
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
python_requires=">=3.5",
cmdclass={"verify": VerifyVersionCommand},
)