-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
65 lines (57 loc) · 1.86 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
62
63
64
65
import os
import sys
import setuptools
import toml
from setuptools import setup
VERSION_NAME = "MPYL_VERSION"
version = os.environ.get(VERSION_NAME, None)
if not version:
print(f"Version needs to be specified via {VERSION_NAME} environment variable")
sys.exit(1)
with open("README.md", "r", encoding="utf-8") as readme_file:
readme = readme_file.read()
def get_install_requirements():
try:
with open("Pipfile", "r", encoding="utf-8") as fh:
pipfile = fh.read()
pipfile_toml = toml.loads(pipfile)
except FileNotFoundError:
return []
try:
required_packages = pipfile_toml["packages"].items()
except KeyError:
return []
return [
"{0}{1}".format(pkg, ver) if ver != "*" else pkg
for pkg, ver in required_packages
]
setup(
name="mpyl",
version=version,
description="Modular Pipeline Library",
author="Vandebron Energie BV",
long_description=readme,
long_description_content_type="text/markdown",
url="https://vandebron.github.io/mpyl",
entry_points={"console_scripts": ["mpyl=mpyl:main"]},
project_urls={
"Documentation": "https://vandebron.github.io/mpyl",
"Source": "https://github.com/Vandebron/mpyl",
"Tracker": "https://github.com/Vandebron/mpyl/issues",
},
classifiers=[
"Topic :: Software Development :: Build Tools",
"Topic :: Utilities",
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
],
install_requires=get_install_requirements(),
package_dir={"": "src"},
include_package_data=True,
packages=setuptools.find_packages(where="./src"),
python_requires=">= 3.9",
package_data={"mpyl": ["py.typed"]},
)