-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
61 lines (50 loc) · 1.38 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
58
59
60
61
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# imports
from io import open
from os.path import exists
from datetime import datetime as dt
from setuptools import find_packages as fp, setup
vfile = "VERSION"
cfile = "COMMITNO"
dtfmt = "%Y%m%d%H%M%S"
""" define inline read file """
def read(n):
return open(n, "r").read().strip()
""" read VERSION file """
ver = read(vfile)
""" then append version with the commit number or timestamp """
if exists(cfile):
ver += "." + read(cfile)
else:
ver += ".dev" + dt.now().strftime(dtfmt)
print(f"VERSION {ver}")
""" execute setup """
setup(
name="aras-oslc-api",
description="OSLC API implementation to expose Aras ItemTypes in RDF representation.",
long_description=read("README.md"),
long_description_content_type="text/markdown",
url="https://aras.koneksys.com",
author="Fabio",
author_email="[email protected]",
keywords=['aras', 'plm', 'oslc', 'rdf', 'json-ld'],
packages=fp(exclude=["*.tests", "*.tests.*", "tests.*"]),
install_requires=[
"python-dotenv",
"RDFLib",
"RDFLib-JSONLD",
"Flask",
"Flask-RESTx",
"Flask-Login",
"Flask-SQLAlchemy",
"flask_cors",
"requests",
"blinker",
],
extras_require={},
python_requires=">=3.6.0",
include_package_data=True,
license=None,
version=ver,
)