-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
37 lines (32 loc) · 971 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
import subprocess
from setuptools import setup
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
ver = "0.1.0"
try: # shamelessly stolen from jishaku
ccount, cerr = subprocess.Popen(
["git", "rev-list", "--count", "HEAD"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
).communicate()
if ccount:
chash, cerr = subprocess.Popen(
["git", "rev-parse", "--short", "HEAD"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
).communicate()
if chash:
ver += ccount.decode().strip() + "+" + chash.decode().strip()
except:
pass
setup(
name="DPyUtils",
version=ver,
author="Clari",
author_email="[email protected]",
url="https://github.com/clari77444/DPyUtils",
license="MIT",
description="Some discord.py utils by Clari",
long_description=long_description,
packages=["DPyUtils"],
)