From 13e8c26d978a42154083cc2d846fa7f719a6d1fc Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Tue, 13 Aug 2024 20:14:04 -0700 Subject: [PATCH 1/2] migrate to pyproject.toml --- pyproject.toml | 20 ++++++++++++++++++++ setup.py | 32 -------------------------------- 2 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 4de312d..370ac72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,19 @@ +[project] +name = "pypager" +description = """Pure Python pager (like "more" and "less").""" +readme = "README.rst" +authors = [{ name = "Jonathan Slenders" }] +requires-python = ">=3.6" +dependencies = ["prompt_toolkit>=3.0.0,<3.1.0", "pygments"] +license = { file = "LICENSE" } +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/jonathanslenders/pypager" + +[project.scripts] +pypager = "pypager.entry_points.run_pypager:run" + [tool.black] target-version = ['py36'] @@ -11,3 +27,7 @@ known_third_party = "prompt_toolkit,pygments" force_grid_wrap = 0 use_parentheses = true line_length = 88 + +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" diff --git a/setup.py b/setup.py deleted file mode 100644 index decabdf..0000000 --- a/setup.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -import os - -from setuptools import find_packages, setup - -import pypager - -with open(os.path.join(os.path.dirname(__file__), "README.rst")) as f: - long_description = f.read() - -install_requires = [ - "prompt_toolkit>=3.0.0,<3.1.0", - "pygments", -] - -setup( - name="pypager", - author="Jonathan Slenders", - version=pypager.__version__, - license="LICENSE", - url="https://github.com/jonathanslenders/pypager", - description='Pure Python pager (like "more" and "less").', - long_description=long_description, - packages=find_packages("."), - python_requires=">=3.6", - install_requires=install_requires, - entry_points={ - "console_scripts": [ - "pypager = pypager.entry_points.run_pypager:run", - ] - }, -) From a6cbe960ef6110b0f1e902ec894605b14377315f Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Tue, 13 Aug 2024 20:17:24 -0700 Subject: [PATCH 2/2] update mypy, ci --- .travis.yml | 4 ++-- mypy.ini | 6 ------ pyproject.toml | 7 +++++++ 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 mypy.ini diff --git a/.travis.yml b/.travis.yml index 276834d..5063bc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,10 @@ script: - echo "$TRAVIS_PYTHON_VERSION" # Check wheather the imports were sorted correctly. - - isort -c -rc pypager setup.py examples + - isort -c -rc pypager examples # Check code formatting. - - black --check pypager setup.py examples + - black --check pypager examples # Type checking - mypy pypager diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 5a7ef2e..0000000 --- a/mypy.ini +++ /dev/null @@ -1,6 +0,0 @@ -[mypy] -ignore_missing_imports = True -no_implicit_optional = True -platform = win32 -strict_equality = True -strict_optional = True diff --git a/pyproject.toml b/pyproject.toml index 370ac72..eaed804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,13 @@ force_grid_wrap = 0 use_parentheses = true line_length = 88 +[tool.mypy] +ignore_missing_imports = true +no_implicit_optional = true +platform = "win32" +strict_equality = true +strict_optional = true + [build-system] requires = ["flit_core >=3.2,<4"] build-backend = "flit_core.buildapi"