From ae89ff9e73baee789bcfa1c914da8e29feb2dc04 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 1 Feb 2021 13:26:04 -0500 Subject: [PATCH] Restructure root and remove Makefile Use setuptools for everything --- Makefile | 21 --------------------- README.md | 11 +++++++++-- {contrib => bin}/kvtml2html.py | 0 lightcards.sh => bin/lightcards | 0 setup.py | 2 ++ 5 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 Makefile rename {contrib => bin}/kvtml2html.py (100%) rename lightcards.sh => bin/lightcards (100%) diff --git a/Makefile b/Makefile deleted file mode 100644 index a126ed9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -.DEFAULT_GOAL := local - -global: - pip install . - mkdir -p /usr/share/man/man1/ - cp man/lightcards.1 ~/.local/share/man/man1/ - cp ./lightcards.sh /usr/local/bin/lightcards - -local: - pip install . - mkdir -p ~/.local/share/man/man1/ - cp man/lightcards.1 ~/.local/share/man/man1/ - cp ./lightcards.sh ~/.local/bin/lightcards - -global-uninstall: - pip uninstall lightcards - rm /usr/local/bin/lightcards - -local-uninstall: - pip uninstall lightcards - rm ~/.local/bin/lightcards diff --git a/README.md b/README.md index 8c7ebd7..9bc7879 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,16 @@ Terminal flashcards from Markdown. ## Installation -Switch to newest version: `git checkout $(git tag | tail -n 1)`, or use the current development state. +### From PyPI +`pip install lightcards` -`make` to install for the current user, or `make global` to install for the whole system. +### From Git +``` +git clone https://git.sr.ht/~armaan/lightcards +cd lightcards +git checkout $(git tag | tail -n 1) # Don't include to use development version +`pip install .` +``` ## Usage see `lightcards --help` diff --git a/contrib/kvtml2html.py b/bin/kvtml2html.py similarity index 100% rename from contrib/kvtml2html.py rename to bin/kvtml2html.py diff --git a/lightcards.sh b/bin/lightcards similarity index 100% rename from lightcards.sh rename to bin/lightcards diff --git a/setup.py b/setup.py index b75e975..830e579 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,8 @@ setup( license="MIT", packages=["lightcards"], install_requires=["beautifulsoup4", "markdown"], + data_files=[("man/man1", ["man/lightcards.1"])], + scripts=['bin/lightcards'], classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Other Audience", -- 2.39.2