diff --git a/.gitignore b/.gitignore index d0fa950..c8477b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,13 @@ +# python cache +__pycache__/ *.pyc -build/ -dist/ -*.egg-info/ -.eggs/ + +# tool cache .pytest_cache/ +.mypy_cache/ +.venv/ +*.lock + +# build output +dist/ +docs/_build/ diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 062a6bc..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,14 +0,0 @@ -include MANIFEST.in -include AUTHORS -include CHANGES -include LICENSE -include README - -include pyte/py.typed - -recursive-include docs *.rst -include docs/conf.py - -recursive-include examples *.py -recursive-include tests *.py -recursive-include tests/captured * diff --git a/README b/README deleted file mode 100644 index d6a20d7..0000000 --- a/README +++ /dev/null @@ -1,59 +0,0 @@ -.. -*- mode: rst -*- - -:: - - _ - | | - _ __ _ _ | |_ ___ - | '_ \ | | | || __|/ _ \ - | |_) || |_| || |_| __/ - | .__/ \__, | \__|\___| - | | __/ | - |_| |___/ 0.8.3dev - - -What is ``pyte``? ------------------ - -It's an in memory VTXXX-compatible terminal emulator. -*XXX* stands for a series of video terminals, developed by -`DEC `_ between -1970 and 1995. The first, and probably the most famous one, was VT100 -terminal, which is now a de-facto standard for all virtual terminal -emulators. ``pyte`` follows the suit. - -So, why would one need a terminal emulator library? - -* To screen scrape terminal apps, for example ``htop`` or ``aptitude``. -* To write cross platform terminal emulators; either with a graphical - (`xterm `_, - `rxvt `_) or a web interface, like - `AjaxTerm `_. -* To have fun, hacking on the ancient, poorly documented technologies. - -**Note**: ``pyte`` started as a fork of `vt102 `_, -which is an incomplete pure Python implementation of VT100 terminal. - - -Installation ------------- - -If you have `pip `_ you can do the usual:: - - pip install pyte - -Otherwise, download the source from `GitHub `_ -and run:: - - python setup.py install - -Similar projects ----------------- - -``pyte`` is not alone in the weird world of terminal emulator libraries, -here's a few other options worth checking out: -`Termemulator `_, -`pyqonsole `_, -`webtty `_, -`AjaxTerm `_ and of course -`vt102 `_. diff --git a/README.rst b/README.rst deleted file mode 120000 index 100b938..0000000 --- a/README.rst +++ /dev/null @@ -1 +0,0 @@ -README \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..6490783 --- /dev/null +++ b/README.rst @@ -0,0 +1,57 @@ +:: + + _ + | | + _ __ _ _ | |_ ___ + | '_ \ | | | || __|/ _ \ + | |_) || |_| || |_| __/ + | .__/ \__, | \__|\___| + | | __/ | + |_| |___/ 0.8.3.dev + + +What is ``pyte``? +----------------- + +It's an in memory VTXXX-compatible terminal emulator. +*XXX* stands for a series of video terminals, developed by +`DEC `_ between +1970 and 1995. The first, and probably the most famous one, was VT100 +terminal, which is now a de-facto standard for all virtual terminal +emulators. ``pyte`` follows the suit. + +So, why would one need a terminal emulator library? + +* To screen scrape terminal apps, for example ``htop`` or ``aptitude``. +* To write cross platform terminal emulators; either with a graphical + (`xterm `_, + `rxvt `_) or a web interface, like + `AjaxTerm `_. +* To have fun, hacking on the ancient, poorly documented technologies. + +**Note**: ``pyte`` started as a fork of `vt102 `_, +which is an incomplete pure Python implementation of VT100 terminal. + + +Installation +------------ + +If you have `pip `_ you can do the usual:: + + pip install pyte + +Otherwise, download the source from `GitHub `_ +and run:: + + python setup.py install + +Similar projects +---------------- + +``pyte`` is not alone in the weird world of terminal emulator libraries, +here's a few other options worth checking out: +`Termemulator `_, +`pyqonsole `_, +`webtty `_, +`AjaxTerm `_ and of course +`vt102 `_. diff --git a/docs/Makefile b/docs/Makefile index 92b2a61..8f37be9 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -25,7 +25,7 @@ help: @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" diff --git a/docs/conf.py b/docs/conf.py index 1d9fb46..784a1be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -52,7 +52,7 @@ # The short X.Y version. version = '0.8.3' # The full version, including alpha/beta/rc tags. -release = '0.8.3dev' +release = '0.8.3.dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pyproject.toml b/pyproject.toml index c44642c..9224fc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ [build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["flit_core"] +build-backend = "flit_core.buildapi" + +[tool.flit.sdist] +include = ["docs/*.rst", "docs/*.py", "examples/", "tests/", "AUTHORS*", "CHANGES*", "LICENSE*"] +exclude = ["**/__pycache__/", "**/.*/", "*.lock"] [tool.mypy] show_error_codes = true @@ -22,7 +26,7 @@ dev = [ name = "pyte" dynamic = ["version"] description = "Simple VTXXX-compatible terminal emulator." -readme = "README" +readme = "README.rst" license = "LGPL-3.0-only" requires-python = ">=3.10" authors = [ diff --git a/pyte/__init__.py b/pyte/__init__.py index e004680..3ed11fd 100644 --- a/pyte/__init__.py +++ b/pyte/__init__.py @@ -21,6 +21,7 @@ see AUTHORS for details. :license: LGPL, see LICENSE for more details. """ +__version__ = "0.8.3.dev" __all__ = ("Screen", "DiffScreen", "HistoryScreen", "DebugScreen", "Stream", "ByteStream") diff --git a/setup.py b/setup.py deleted file mode 100755 index 98be8e7..0000000 --- a/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -#! /usr/bin/env python - -import os - -from setuptools import setup - - -here = os.path.abspath(os.path.dirname(__file__)) - -DESCRIPTION = "Simple VTXXX-compatible terminal emulator." - -try: - with open(os.path.join(here, "README")) as f: - LONG_DESCRIPTION = f.read() -except OSError: - LONG_DESCRIPTION = "" - - -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13" - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Terminals :: Terminal Emulators/X Terminals", -] - - -setup(name="pyte", - version="0.8.3dev", - packages=["pyte"], - install_requires=["wcwidth"], - python_requires=">=3.10", - platforms=["any"], - package_data={"pyte": ["py.typed"]}, - - author="Sergei Lebedev", - author_email="superbobry@gmail.com", - description=DESCRIPTION, - long_description=LONG_DESCRIPTION, - classifiers=CLASSIFIERS, - keywords=["vt102", "vte", "terminal emulator"], - url="https://github.com/selectel/pyte")