2020-12-13 05:46:30 +03:00
|
|
|
import setuptools
|
2021-12-24 07:57:18 +03:00
|
|
|
import toml
|
2020-12-13 05:46:30 +03:00
|
|
|
|
|
|
|
|
2021-12-24 07:57:18 +03:00
|
|
|
with open("pyproject.toml") as fd:
|
|
|
|
pkgdata = toml.load(fd)
|
|
|
|
projectdata = pkgdata['project']
|
2020-12-13 05:46:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
# extract info
|
2021-12-24 07:57:18 +03:00
|
|
|
with open(projectdata['readme'], "r") as fh:
|
|
|
|
long_description = fh.read()
|
2020-12-13 05:46:30 +03:00
|
|
|
|
|
|
|
setuptools.setup(
|
2021-12-24 07:57:18 +03:00
|
|
|
name=projectdata['name'],
|
|
|
|
version=projectdata['version'],
|
|
|
|
author=projectdata['authors'][0]['name'],
|
|
|
|
author_email=projectdata['authors'][0]['email'],
|
|
|
|
description=projectdata["description"],
|
|
|
|
license="GPLv3",
|
2020-12-13 05:46:30 +03:00
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
2021-12-24 07:57:18 +03:00
|
|
|
url=projectdata['urls']['repository'],
|
|
|
|
packages=[projectdata['name']],
|
2020-12-13 05:46:30 +03:00
|
|
|
classifiers=[
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
],
|
2021-12-24 07:57:18 +03:00
|
|
|
python_requires=projectdata['requires-python'],
|
|
|
|
install_requires=projectdata['dependencies'],
|
2020-12-13 05:46:30 +03:00
|
|
|
include_package_data=True,
|
|
|
|
entry_points = {
|
2021-12-24 07:57:18 +03:00
|
|
|
'console_scripts':[
|
|
|
|
k + '=' + projectdata['scripts'][k] for k in projectdata['scripts']
|
|
|
|
]
|
|
|
|
|
2020-12-13 05:46:30 +03:00
|
|
|
}
|
|
|
|
)
|