-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
executable file
·58 lines (51 loc) · 1.81 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import json
from setuptools import setup, find_packages
def locked_requirements(section):
"""Look through the 'Pipfile.lock' to fetch requirements by section."""
with open('Pipfile.lock') as pip_file:
pipfile_json = json.load(pip_file)
if section not in pipfile_json:
print("{0} section missing from Pipfile.lock".format(section))
return []
return [package + detail.get('version', "")
for package, detail in pipfile_json[section].items()]
here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, "salesforce_timecard", "__init__.py"), "r") as f:
exec(f.read(), about)
setup(
name=about["__title__"],
version=about["__version__"],
description=about["__description__"],
long_description="Check on {}".format(about["__url__"]),
author=about["__author__"],
author_email=about["__author_email__"],
maintainer=about["__maintainer__"],
maintainer_email=about["__maintainer_email__"],
license=about["__license__"],
url=about["__url__"],
packages=["salesforce_timecard",],
install_requires=locked_requirements("default"),
entry_points={
"console_scripts": [
"timecard = salesforce_timecard.cli:cli"
],
},
include_package_data=True,
zip_safe=False,
keywords=about["__keywords__"],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Environment :: Console",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
)