-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
57 lines (47 loc) · 1.65 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
48
49
50
51
52
53
54
55
56
57
from setuptools import setup, find_packages
import subprocess
def get_latest_git_tag():
try:
version = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
version = version.strip().decode(
"utf-8"
) # Remove trailing newline and decode bytes to string
# Remove the 'v' from the tag
if version.startswith("v"):
version = version[1:]
return version
except Exception as e:
print(f"An exception occurred while getting the latest git tag: {e}")
return None
def read_requirements():
with open("requirements.txt") as f:
return f.read().splitlines()
VERSION = get_latest_git_tag() or "0.0.1" # Fallback version
PROJECT_URLS = {
"Bug Tracker": "https://github.com/yazdipour/OmnivoreQL/issues",
"Source Code": "https://github.com/yazdipour/OmnivoreQL",
}
setup(
name="omnivoreql",
version=VERSION,
description="Omnivore API Client for Python",
author="Shahriar Yazdipour",
author_email="[email protected]",
packages=find_packages(),
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
license="MIT",
keywords="omnivore api readlater graphql gql client",
platforms="any",
url="https://github.com/yazdipour/OmnivoreQL",
project_urls=PROJECT_URLS,
include_package_data=True,
python_requires=">=3",
classifiers=[
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
install_requires=read_requirements(),
)