Switch to pyproject.toml

This commit is contained in:
Samuel Sloniker 2022-07-14 19:18:16 -07:00
parent 1e04769e9d
commit 8459f640dc
3 changed files with 72 additions and 55 deletions

View File

@ -6,6 +6,7 @@ import json
import sys import sys
import gptc import gptc
def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="General Purpose Text Classifier", prog="gptc" description="General Purpose Text Classifier", prog="gptc"
) )
@ -51,3 +52,7 @@ else:
print(classifier.classify(text)) print(classifier.classify(text))
else: else:
print(json.dumps(classifier.confidence(text))) print(json.dumps(classifier.confidence(text)))
if __name__ == "__main__":
main()

29
pyproject.toml Normal file
View File

@ -0,0 +1,29 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gptc"
version = "2.0.0"
description = "General-purpose text classifier"
readme = "README.md"
authors = [{ name = "Samuel Sloniker", email = "sam@kj7rrv.com"}]
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Operating System :: OS Independent",
]
dependencies = []
requires-python = ">=3.7"
[project.urls]
Homepage = "https://git.kj7rrv.com/kj7rrv/gptc"
[project.scripts]
gptc = "gptc.__main__:main"
[tool.setuptools]
packages = ["gptc"]

View File

@ -1,17 +0,0 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="gptc",
version="2.0.0",
description="General-purpose text classifier",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
)