-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (30 loc) · 947 Bytes
/
Copy pathsetup.py
File metadata and controls
38 lines (30 loc) · 947 Bytes
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
from setuptools import setup, find_packages
requirements = []
with open('requirements.txt') as f:
requirements = f.read().splitlines()
packages = [
'distee'
]
version = '0.0.1a'
try:
import subprocess
p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += out.decode('utf-8').strip()
p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
version += '+g' + out.decode('utf-8').strip()
except Exception:
pass
setup(name='distee.py',
author='Teekeks',
license='MIT',
version=version,
description='A Discord API wrapper',
install_requires=requirements,
python_requires='>=3.9.0',
packages=find_packages())