-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (46 loc) · 1.64 KB
/
setup.py
File metadata and controls
51 lines (46 loc) · 1.64 KB
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
import setuptools
import os
from pkg_resources import parse_version
mode = os.environ.get("LARRY_RELEASE_MODE", "pre")
print(mode)
pre_version = parse_version(os.listdir("pre")[0].split("-")[1])
rel_version = parse_version(os.listdir("rel")[0].split("-")[1])
if mode == "pre":
if pre_version > rel_version:
p = pre_version.pre
version = pre_version.base_version + p[0] + str(p[1]+1)
else:
version = f"{rel_version.major}.{rel_version.minor}.{rel_version.micro+1}a0"
else:
version = f"{rel_version.major}.{rel_version.minor}.{rel_version.micro+1}"
with open("larry/__init__.py") as fp:
text = fp.read()
with open("larry/__init__.py", "w") as fp:
fp.write(text.replace("{VERSION}", version))
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="larry",
version=version,
author="Dave Schultz",
author_email="[email protected]",
description="Library of helper reference for common data tasks using AWS resources such as S3, Lambda, MTurk and others",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/dschultz0/larry",
packages=setuptools.find_packages(exclude=['test']),
include_package_data=False,
keywords="larry data aws boto3 mturk s3 lambda sfn",
python_requires=">=3.8",
extras_require={
"boto": ["boto3"],
"pdf": ["pdfminer.six"],
"image": ["Pillow"],
"jinja": ["Jinja2"]
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)