diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2108510..aafdab9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8","3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: pip - - name: Install requirements - run: pip install -r requirements.txt + - name: Install tox + run: pip install tox - name: Run tox run: tox -e py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4ffaa43 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,39 @@ +[project] +name = "puzpy" +description = "python crossword puzzle library" +readme = { file = "README.rst", content-type = "text/x-rst" } +license = { file = "LICENSE" } +version = "0.2.6" +keywords = [ "puz", "crosswords", "crossword", "puzzle", "acrosslite", "xword", "xwords" ] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "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", + "Topic :: Games/Entertainment :: Puzzle Games", +] +authors = [ + { name = "Alex Dejarnatt", email = "adejarnatt@gmail.com" }, +] +maintainers = [ + { name = "Simeon Visser", email = "simeonvisser@gmail.com" }, +] + + +[project.urls] +Repository = "https://github.com/alexdej/puzpy.git" +Issues = "https://github.com/alexdej/puzpy/issues" + + +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 02cff76..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5e40900..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1da7f72..0000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup - -setup( - name='puzpy', - version='0.2.6', - description='python crossword puzzle library', - long_description=open('README.rst').read(), - long_description_content_type='text/x-rst', - author='Alex Dejarnatt', - author_email='adejarnatt@gmail.com', - maintainer='Simeon Visser', - maintainer_email='simeonvisser@gmail.com', - url='https://github.com/alexdej/puzpy', - download_url='https://pypi.python.org/pypi/puzpy', - py_modules=['puz'], - install_requires=[], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - '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', - 'Topic :: Games/Entertainment :: Puzzle Games', - ], - keywords='puz crosswords crossword puzzle acrosslite xword xwords' -) diff --git a/tox.ini b/tox.ini index 99188d4..a85250b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,23 @@ [tox] -envlist = py27, py38, py39, py310, py311, py312 -requires = virtualenv<20.22.0 +requires = + tox>=4 + +envlist = lint, py{310,311,312}, coverage [testenv] -commands = +description = run unit tests +commands = python tests.py + +[testenv:lint] +description = run flake8 on source code +commands = flake8 . --count --show-source --max-line-length=127 --statistics deps = flake8 +skip_install = true -[testenv:py36] +[testenv:coverage] +description = generate coverage report for unit tests commands = coverage run tests.py coverage html