From 3073bfda1ab8d74a6ad0091c401e272a88964b0b Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Sat, 27 Jul 2024 14:16:55 -0700 Subject: [PATCH 1/2] use terminaltables3 --- keep/utils.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keep/utils.py b/keep/utils.py index d605a560..83367144 100644 --- a/keep/utils.py +++ b/keep/utils.py @@ -9,7 +9,7 @@ import time import click import requests -from terminaltables import AsciiTable +from terminaltables3 import AsciiTable from textwrap import wrap from keep import about diff --git a/requirements.txt b/requirements.txt index d0cc3591..d5c73cf3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ click requests -terminaltables +terminaltables3 PyGithub==1.43.7 From d80ac52c4b9f12e900aee6b82c7e84c994213902 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Sat, 27 Jul 2024 14:20:39 -0700 Subject: [PATCH 2/2] migrate to pyproject.toml --- MANIFEST.in | 2 -- pyproject.toml | 24 ++++++++++++++++++++++++ release.sh | 2 +- requirements.txt | 4 ---- setup.py | 39 --------------------------------------- 5 files changed, 25 insertions(+), 46 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index fd81e14b..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include completions/keep.bash -include completions/keep.zsh diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..89304f6e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,24 @@ +[project] +name = "keep" +version = "2.10.1" +description = "Personal shell command keeper" +readme = "README.md" +authors = [ + { name = "Himanshu Mishra", email = "himanshu.mishra.kgp@gmail.com" }, +] +dependencies = ["PyGithub", "click", "requests", "terminaltables3"] +requires-python = ">=3.8" + +[project.urls] +Homepage = "https://github.com/orkohunter/keep" +Downloads = "https://github.com/orkohunter/keep/archive/master.zip" + +[project.scripts] +keep = "keep.cli:cli" + +[tool.flit.sdist] +include = ["completions/"] + +[build-system] +requires = ["flit_core>=3.4"] +build-backend = "flit_core.buildapi" diff --git a/release.sh b/release.sh index 25918f50..c0a50827 100755 --- a/release.sh +++ b/release.sh @@ -2,5 +2,5 @@ # pip install twine wheel rm -rf build/* rm -rf dist/* -python setup.py sdist bdist_wheel +python -m build twine upload dist/* diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index d5c73cf3..00000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -click -requests -terminaltables3 -PyGithub==1.43.7 diff --git a/setup.py b/setup.py deleted file mode 100644 index ff8a222e..00000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- - -import codecs -import os -import sys -from setuptools import setup - -from keep import about - -here = os.path.abspath(os.path.dirname(__file__)) - -with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = '\n' + f.read() - -if __name__ == "__main__": - setup( - name=about.__name__, - packages=['keep', 'keep.commands'], - version=about.__version__, - description='Personal shell command keeper', - long_description=long_description, - author='Himanshu Mishra', - author_email='himanshu.mishra.kgp@gmail.com', - url="https://github.com/orkohunter/keep", - download_url="https://github.com/orkohunter/keep/archive/master.zip", - include_package_data=True, - install_requires=[ - 'click', - 'requests', - 'terminaltables', - 'PyGithub' - ], - entry_points={ - 'console_scripts': [ - 'keep=keep.cli:cli' - ], - }, - )