M Makefile => Makefile +38 -8
@@ 1,20 1,50 @@
-python = python3
+VERSION=1.0.1
+PY_COMPILE_BIN=python -m py_compile
+
+#BUILD_BIN=python -m build
+BUILD_BIN=pyproject-build
+
+#UNITTEST_FILE_BIN=python -m unittest
+#UNITTEST_DIR_BIN=python -m unittest discover --top-level-directory .
+UNITTEST_FILE_BIN=unittest --color
+UNITTEST_DIR_BIN=unittest --color --working-directory .
+
+#MYPY_BIN=python -m mypy
+MYPY_BIN=MYPY_CACHE_DIR=gap/__mypycache__ mypy
+
+#PIPX_BIN=python -m pipx
+PIPX_BIN=pipx
+
+.PHONY: clean
clean:
- rm -rf **/__pycache__ **/__mypycache__ **/*.pyc build dist neopaste.egg-info
+ rm -rf **/__pycache__ **/__mypycache__ **/*.pyc build *.egg-info
+neopaste/cli.py: neopaste/cli.toml
+ gap neopaste/cli.toml -o neopaste/cli.py
+
+.PHONY: test
test:
- $(python) -m py_compile neopaste/*.py
+ $(PY_COMPILE_BIN) gap/*.py
-build:
- gap neopaste/cli.toml -o neopaste/cli.py
- $(python) setup.py sdist bdist_wheel
+PY_FILES=neopaste/cli.py neopaste/__main__.py neopaste/columnar.py neopaste/internals.py
+PYBUILD_FILES=pyproject.toml LICENSE.md README.md
+
+build/neopaste-$(VERSION)-py3-none-any.whl: $(PY_FILES) $(PYBUILD_FILES)
+ mkdir -p build
+ $(BUILD_BIN) --wheel --no-isolation --outdir build/
+
+.PHONY: build
+build: build/neopaste-$(VERSION)-py3-none-any.whl
+.PHONY: reinstall
reinstall: uninstall install
-install:
- pipx install .
+.PHONY: install
+install: build/neopaste-$(VERSION)-py3-none-any.whl
+ $(PIPX_BIN) install build/neopaste-$(VERSION)-py3-none-any.whl
+.PHONY: uninstall
uninstall:
pipx uninstall neopaste
M README.md => README.md +2 -5
@@ 3,6 3,7 @@
Paste file streams side-by-side, without concern for Unicode wide characters or
ANSI color codes.
+
### Usage
```
@@ 41,8 42,6 @@ Filesystem Size Used Avail Use% Mounted on June 2020 Weather
28 29 30 ʻ ʻ ʻ ʻ 0.0 in/h
```
-----
-
## Dependencies
@@ 52,9 51,7 @@ manage runtime dependencies for you.
The only runtime dependency is **wcwidth**, available from PyPI through pip.
Testing and build dependencies are **setuptools** and
-[gap](https://git.dominic-ricottone.com/gap).
-
-----
+[gap](https://git.dominic-ricottone.com/~dricottone/gap).
## Licensing
A pyproject.toml => pyproject.toml +20 -0
@@ 0,0 1,20 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "neopaste"
+description = "Paste file streams side-by-side"
+readme = "README.md"
+version = "1.0.1"
+authors = [ { name = "Dominic Ricottone", email = "me@dominic-ricottone.com" } ]
+urls = { source = "git.dominic-ricottone.com/~dricottone/neopaste" }
+license = { file = "LICENSE.md" }
+requires-python = ">=3.6"
+dependencies = [
+ "wcwidth >= 0.2.4",
+]
+
+[project.scripts]
+npaste = "neopaste.__main__:main"
+
D setup.py => setup.py +0 -24
@@ 1,24 0,0 @@
-#!/usr/bin/env python3
-
-from setuptools import setup
-
-long_description = None
-with open('README.md', encoding='utf-8') as f:
- long_description = f.read()
-
-setup(
- name="neopaste",
- packages=["neopaste"],
- version="1.0.0",
- license="GPL",
- description="Paste file streams side-by-side",
- long_description=long_description,
- long_description_content_type='text/markdown',
- author="Dominic Ricottone",
- author_email="me@dominic-ricottone.com",
- url="git.dominic-ricottone.com/neopaste",
- entry_points={"console_scripts": ["npaste = neopaste.__main__:main"]},
- install_requires=["wcwidth>=0.2.4"],
- python_requires=">=3.6",
-)
-