From 5eca437ef95d23e8674b9e8765ce16005159d334 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Thu, 14 Nov 2024 11:37:07 -0600 Subject: [PATCH 1/2] Migrate to pyproject.toml --- pyproject.toml | 47 ++++++++++++++++++++++++++++++++++ pytest_test_groups/__init__.py | 2 ++ setup.cfg | 5 +--- setup.py | 36 +------------------------- 4 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2d9d597 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=75", +] + +[project] +name = "pytest-test-groups" +description = "A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups." +readme = "README.rst" +requires-python = ">=3.8" +authors = [ + { name = "Mark Adams", email = "mark@markadams.me" }, +] +maintainers = [ + { name = "Mark Adams", email = "mark@markadams.me" }, +] +license = {file = "LICENSE"} +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Topic :: Software Development :: Testing', + "Programming Language :: Python", + 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +dependencies = [ + "pytest>=7.0.0", +] +dynamic = ["version"] + +[project.urls] +Documentation = "https://github.com/mark-adams/pytest-test-groups" +Repository = "https://github.com/mark-adams/pytest-test-groups" + +[project.entry-points.pytest11] +test-groups = "pytest_test_groups" + +[tool.setuptools.dynamic] +version = {attr = "pytest_test_groups.__version__"} \ No newline at end of file diff --git a/pytest_test_groups/__init__.py b/pytest_test_groups/__init__.py index bc3bdde..4248395 100644 --- a/pytest_test_groups/__init__.py +++ b/pytest_test_groups/__init__.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +__version__ = '1.1.0' + # Import python libs from random import Random diff --git a/setup.cfg b/setup.cfg index f3d42d1..ec4d2a5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,2 @@ [flake8] -max-line-length = 119 - -[wheel] -universal = true +max-line-length = 119 \ No newline at end of file diff --git a/setup.py b/setup.py index a606b92..fc1f76c 100644 --- a/setup.py +++ b/setup.py @@ -1,37 +1,3 @@ -import codecs -import os - from setuptools import setup - -def read(fname): - file_path = os.path.join(os.path.dirname(__file__), fname) - return codecs.open(file_path, encoding='utf-8').read() - - -setup( - name="pytest-test-groups", - description=('A Pytest plugin for running a subset of your tests by ' - 'splitting them in to equally sized groups.'), - url='https://github.com/mark-adams/pytest-test-groups', - author='Mark Adams', - author_email='mark@markadams.me', - packages=['pytest_test_groups'], - version='1.1.0', - long_description=read('README.rst'), - install_requires=['pytest>=8'], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Topic :: Software Development :: Testing', - 'Programming Language :: Python :: 3', - ], - entry_points={ - 'pytest11': [ - 'test-groups = pytest_test_groups', - ] - }, -) +setup() \ No newline at end of file From eb4532b5512f23762dc57bf125aa2f47703e5413 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Thu, 14 Nov 2024 11:39:28 -0600 Subject: [PATCH 2/2] Add missing newline --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fc1f76c..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,3 @@ from setuptools import setup -setup() \ No newline at end of file +setup()