diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7381f37..861e42d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -49,7 +49,7 @@ jobs: setup.py - name: Install dependencies - run: python -m pip install -r requirements.txt -e ".[dev]" + run: python -m pip install -e ".[dev]" - name: Set up pyright run: echo "PYRIGHT_VERSION=$(python -c 'import pyright; print(pyright.__pyright_version__)')" >> $GITHUB_ENV @@ -94,7 +94,7 @@ jobs: setup.py - name: Install dependencies - run: python -m pip install -r requirements.txt -e ".[dev]" -e ".[docs]" + run: python -m pip install -e ".[dev]" -e ".[docs]" - name: Run mypy run: mypy . diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 45adbf5..d550962 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r requirements.txt -e ".[dev]" + python -m pip install -e ".[dev]" python -m pip install --pre tox-gh-actions - name: Test with pytest run: | @@ -48,7 +48,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r requirements.txt -e ".[dev]" + python -m pip install -e ".[dev]" python -m pip install --pre tox-gh-actions - name: Test with pytest run: tox diff --git a/pyproject.toml b/pyproject.toml index 49c617f..9db538c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,14 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel" -] +requires = ["setuptools>=42"] build-backend = "setuptools.build_meta" [project] name = "table2ascii" authors = [{name = "Jonah Lawrence", email = "jonah@freshidea.com"}] -dynamic = ["version", "description", "readme", "dependencies", "optional-dependencies"] +dynamic = ["version"] +description = "Convert 2D Python lists into Unicode/ASCII tables" +readme = "README.md" requires-python = ">=3.7" license = {file = "LICENSE"} keywords = ["table", "ascii", "unicode", "formatter"] @@ -38,7 +37,30 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] +dependencies = [ + "typing-extensions>=3.7.4; python_version<'3.8'", + "wcwidth<1", +] +[project.optional-dependencies] +docs = [ + "enum-tools", + "sphinx", + "sphinx-autobuild", + "sphinx-toolbox", + "sphinxcontrib_trio", + "sphinxext-opengraph", + "sphinx-book-theme==0.3.3", +] +dev = [ + "mypy>=0.982,<1", + "pre-commit>=2.0.0,<3", + "pyright>=1.0.0,<2", + "pytest>=6.0.0,<8", + "slotscheck>=0.1.0,<1", + "taskipy>=1.0.0,<2", + "tox>=3.0.0,<5", +] [project.urls] documentation = "https://table2ascii.rtfd.io" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b6ab4e4..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -typing-extensions>=3.7.4; python_version<'3.8' -wcwidth<1 \ No newline at end of file diff --git a/setup.py b/setup.py index 69b0dd0..5fbf35d 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ # /usr/bin/env python -import os import re from setuptools import setup @@ -14,57 +13,4 @@ def version(): return version.group(1) -def long_description(): - # check if README.md exists - if not os.path.exists("README.md"): - return "" - with open("README.md", "r", encoding="utf-8") as fh: - return fh.read() - - -def requirements(): - # check if requirements.txt exists - if not os.path.exists("requirements.txt"): - return [] - with open("requirements.txt") as f: - return f.read().splitlines() - - -extras_require = { - "docs": [ - "enum-tools", - "sphinx", - "sphinx-autobuild", - "sphinx-toolbox", - "sphinxcontrib_trio", - "sphinxext-opengraph", - "sphinx-book-theme==0.3.3", - ], - "dev": [ - "mypy>=0.982,<1", - "pre-commit>=2.0.0,<3", - "pyright>=1.0.0,<2", - "pytest>=6.0.0,<8", - "slotscheck>=0.1.0,<1", - "taskipy>=1.0.0,<2", - "tox>=3.0.0,<5", - ], -} - -setup( - name="table2ascii", - version=version(), - author="Jonah Lawrence", - author_email="jonah@freshidea.com", - description="Convert 2D Python lists into Unicode/Ascii tables", - long_description=long_description(), - long_description_content_type="text/markdown", - url="https://github.com/DenverCoder1/table2ascii", - packages=["table2ascii"], - install_requires=requirements(), - extras_require=extras_require, - setup_requires=[], - tests_require=[ - "pytest>=6.2,<8", - ], -) +setup(name="table2ascii", version=version()) diff --git a/table2ascii/__init__.py b/table2ascii/__init__.py index 902a153..19fa31a 100644 --- a/table2ascii/__init__.py +++ b/table2ascii/__init__.py @@ -8,7 +8,7 @@ from .table_style import TableStyle from .table_to_ascii import table2ascii -__version__ = "1.0.3" +__version__ = "1.0.4" __all__ = [ "Alignment", diff --git a/tox.ini b/tox.ini index d505b52..448f7b6 100644 --- a/tox.ini +++ b/tox.ini @@ -4,5 +4,4 @@ envlist = py37, py38, py39, py310, py311 [testenv] deps = pytest - -rrequirements.txt commands = pytest tests -s