-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (30 loc) · 998 Bytes
/
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
#!/usr/bin/env python
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.install import install
from src import VERSION
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = "verify that the package git tag matches our version"
def run(self):
tag = os.getenv("COMMIT_TAG")
if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)
with open("requirements.txt") as f:
DEPENDENCIES = f.read().splitlines()
setup(
name="src",
packages=find_packages(),
version=VERSION,
description="Light weight semantic segmentation.",
author="Daniel Sola",
license="MIT",
install_requires=DEPENDENCIES,
python_requires=">=3.8",
url="https://github.com/dansola/PGA-Net",
cmdclass={"verify": VerifyVersionCommand},
)