diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69ea024..599fd44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"] + python: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest, windows-latest, macos-latest] steps: @@ -51,7 +51,7 @@ jobs: - name: Install tox run: | python -m pip install --upgrade pip - pip install tox + python -m pip install tox - name: Test shell: bash diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c23cd7d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[build-system] +requires = ["setuptools >=61", "setuptools_scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "pytest-datadir" +authors = [ + { name = "Gabriel Reis", email = "gabrielcnr@gmail.com" }, +] +description = "pytest plugin for test data directories and files" +keywords = ["pytest", "test", "unittest", "directory", "file"] +license = { text = "MIT" } +urls = {Homepage = "http://github.com/gabrielcnr/pytest-datadir"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "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", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", +] +dynamic = ["version"] +requires-python = ">=3.8" +dependencies = [ + "pytest>=5.0", +] + +[project.entry-points.pytest11] +pytest-datadir = "pytest_datadir.plugin" + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.optional-dependencies] +testing = [ + "pytest", + "tox", +] +dev = [ + "pytest-datadir[testing]", + "pre-commit", +] + +[tool.setuptools_scm] +write_to = "src/pytest_datadir/_version.py" + +[tool.setuptools.packages.find] +include = ["pytest_datadir", "pytest_datadir.*"] +where = ["src"] + +[tool.pytest.ini_options] +testpaths = ["tests"] diff --git a/setup.py b/setup.py index 8309810..14ace29 100644 --- a/setup.py +++ b/setup.py @@ -1,42 +1,4 @@ -import io - -from setuptools import find_packages from setuptools import setup -with io.open("README.md", encoding="UTF-8") as fp: - long_description = fp.read() - - -setup( - name="pytest-datadir", - use_scm_version={"write_to": "src/pytest_datadir/_version.py"}, - packages=find_packages(where="src"), - entry_points={ - "pytest11": ["pytest-datadir = pytest_datadir.plugin"], - }, - package_dir={"": "src"}, - setup_requires=["setuptools_scm"], - install_requires=["pytest>=5.0"], - author="Gabriel Reis", - author_email="gabrielcnr@gmail.com", - description="pytest plugin for test data directories and files", - long_description=long_description, - long_description_content_type="text/markdown", - license="MIT", - keywords="pytest test unittest directory file", - url="http://github.com/gabrielcnr/pytest-datadir", - python_requires=">=3.8", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "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", - "Topic :: Software Development :: Quality Assurance", - "Topic :: Software Development :: Testing", - ], -) +# Please check pyproject.toml for metadata +setup()