46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
|
|
"""Project building script.
|
|
|
|
"""
|
|
from typing import List
|
|
|
|
import setuptools
|
|
import toml
|
|
|
|
from groupid import artifactid as artifact
|
|
|
|
|
|
def get_requirements() -> List[str]:
|
|
with open("Pipfile", "r") as file:
|
|
pipfile = file.read()
|
|
toml_dict = toml.loads(pipfile)
|
|
|
|
packages = toml_dict["packages"]
|
|
deps = list()
|
|
for key in packages:
|
|
if packages[key] == "*" or type(packages[key]) != str:
|
|
deps.append(key)
|
|
else:
|
|
deps.append(key + " " + packages[key])
|
|
return deps
|
|
|
|
|
|
setuptools.setup(
|
|
name=artifact.PACKAGE_NAME,
|
|
version=artifact.PACKAGE_VERSION,
|
|
author=artifact.PACKAGE_AUTHOR,
|
|
author_email=artifact.PACKAGE_MAINTAINER_CONTACT,
|
|
description=artifact.PACKAGE_DESCRIPTION,
|
|
long_description=artifact.PACKAGE_LONG_DESCRIPTION,
|
|
long_description_content="text/markdown",
|
|
url=artifact.PACKAGE_URL,
|
|
install_requires=get_requirements(),
|
|
packages=setuptools.find_packages(exclude=["*.test.*", "*.test", "test.*", "test"]),
|
|
include_package_data=True,
|
|
classifiers=[
|
|
"License :: Other/Proprietary License",
|
|
"Programming Language :: Python :: 3.8"
|
|
]
|
|
)
|