-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (40 loc) · 1.6 KB
/
setup.py
File metadata and controls
50 lines (40 loc) · 1.6 KB
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
from os import environ as env
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
VERSION = "0.1.0"
DESC = "A convenient way to calculate the edit distance between html files"
with open("README.md", "r", encoding="utf-8") as readme:
long_description = readme.read()
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = "verify tha the git tag matches this version"
def run(self):
tag = env.get("VANGUARD_TAG")
if tag != VERSION:
info = f"Git tag: {tag} doesn't match with this version: {VERSION}"
sys.exit(info)
setup(
name="vanguardkit",
version=VERSION,
description=DESC,
long_description=long_description,
long_description_content_type="text/markdown",
author="Daniel Omar Vergara Pérez",
author_email="daniel.omar.vergara@gmail.com",
url="https://github.com/dany2691/vanguard-kit",
packages=find_packages(exclude=("tests",)),
install_requires=["zss", "beautifulsoup4", "html5lib"],
license="MIT",
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
cmdclass={"verify": VerifyVersionCommand},
)