From a5b395fb2bd0209147a6090a7ec28214ac49ce2b Mon Sep 17 00:00:00 2001 From: Tiziano Zito Date: Sat, 12 Apr 2025 15:18:42 +0200 Subject: [PATCH] move to pyproject.toml build setup --- .../plugins}/create_groups/create_groups.py | 0 pyproject.toml | 25 ++++++++++ setup.py | 48 ------------------- 3 files changed, 25 insertions(+), 48 deletions(-) rename {plugins => grader/plugins}/create_groups/create_groups.py (100%) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/plugins/create_groups/create_groups.py b/grader/plugins/create_groups/create_groups.py similarity index 100% rename from plugins/create_groups/create_groups.py rename to grader/plugins/create_groups/create_groups.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2b25f69 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[project] +name = "grader" +description = "a Python module and command-line utility to grade applications" +version = "0.1" +authors = [{name = "Grader contributors"}] +keywords = ["grading applications"] +license = "GPL-3.0-or-later" +classifiers = [ 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Build Tools', + 'Programming Language :: Python :: 3', +] +urls = {Homepage = "https://github.com/ASPP/grader"} +requires-python = ">= 3.10" +dependencies = ['numpy',] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.scripts] +grader = "grader.grader:main" + +[tool.aliases] +test = "pytest" diff --git a/setup.py b/setup.py deleted file mode 100644 index 3c3b403..0000000 --- a/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -import os - -from setuptools import setup, find_packages - -from grader import ( - __author__, - __description__, - __license__, - __name__, - __url__, - __version__, -) - -# this file is used to pick the relevant metadata for setup.py -INITFILE = os.path.join('grader', '__init__.py') -# the directory we are in -CWD = os.path.abspath(os.path.dirname(__file__)) - -# Get the long description from the README file -with open(os.path.join(CWD, 'README.md'), encoding='utf-8') as f: - long_description = f.read() - -setup( - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - version=__version__, - author=__author__, - description=__description__, - long_description=long_description, - license=__license__, - name=__name__, - url=__url__, - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', # noqa - 'Programming Language :: Python :: 3', - ], - keywords='grading applications', - packages=find_packages(), - install_requires=['pytest', 'numpy'], - entry_points={ - 'console_scripts': [ - 'grader=grader.grader:main', - ], - }, -)