From 926d01493b6656da1d72f625eb9a314ebf027b89 Mon Sep 17 00:00:00 2001 From: "kujiu (@rincevent)" Date: Fri, 19 Nov 2021 23:23:42 +0100 Subject: [PATCH] Simpler packaging --- Makefile | 18 ++ babel.cfg | 15 ++ {nervtn/client/tui => nervtn_tui}/README.rst | 0 {nervtn/client/tui => nervtn_tui}/__init__.py | 0 .../tui => nervtn_tui}/tests/__init__.py | 0 pyproject.toml | 194 ++++++++++++++++++ 6 files changed, 227 insertions(+) create mode 100644 Makefile create mode 100644 babel.cfg rename {nervtn/client/tui => nervtn_tui}/README.rst (100%) rename {nervtn/client/tui => nervtn_tui}/__init__.py (100%) rename {nervtn/client/tui => nervtn_tui}/tests/__init__.py (100%) create mode 100644 pyproject.toml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ef6ec64 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +PYTHON = python3 +SRCDIR = . + +all: clean sdist wheel + +test: + py.test + +clean: + rm -rf *.egg-info dist build .eggs .pytest_cache + +sdist: + flit -f $(SRCDIR)/pyproject.toml build --no-setup-py --format=sdist + +wheel: + flit -f $(SRCDIR)/pyproject.toml build --no-setup-py --format=wheel + +.PHONY: clean test sdist wheel diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..fa569da --- /dev/null +++ b/babel.cfg @@ -0,0 +1,15 @@ +[python: **.py] +encoding = utf-8 + +[javascript: **.js] +[javascript: **.mjs] + +[django: templates/**.*] +encoding = utf-8 +ignore_tags = script,style +include_attrs = alt title summary placeholder aria-label + +[babelvueextractor.extract.extract_vue: **/**.vue] +encoding = utf-8 +ignore_tags = script,style +include_attrs = alt title summary placeholder aria-label diff --git a/nervtn/client/tui/README.rst b/nervtn_tui/README.rst similarity index 100% rename from nervtn/client/tui/README.rst rename to nervtn_tui/README.rst diff --git a/nervtn/client/tui/__init__.py b/nervtn_tui/__init__.py similarity index 100% rename from nervtn/client/tui/__init__.py rename to nervtn_tui/__init__.py diff --git a/nervtn/client/tui/tests/__init__.py b/nervtn_tui/tests/__init__.py similarity index 100% rename from nervtn/client/tui/tests/__init__.py rename to nervtn_tui/tests/__init__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6a89152 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,194 @@ +[build-system] +requires = ["flit_core>=3.2"] +build-backend = "flit_core.buildapi" + +[project] +name = "nervtn_tui" +version = "0.0.1" +requires-python = ">=3.8" +dependencies = [ + "nervtn-common==0.0.1" +] +license = {text = "EUPL-1.2"} +authors = [ + {name = "Nerv Project ASBL", email = "contact@nerv-project.eu"}, + {name = "kujiu"}, + {name = "ptitgnu"} +] +maintainers = [ + {name = "Nerv Project ASBL", email = "contact@nerv-project.eu"}, + {name = "kujiu"}, + {name = "ptitgnu"} +] +description = "Nerv Tales Network TUI client" +readme = {file = "README.rst", content-type = "text/x-rst"} +keywords = ["management", "accounting", "creators", "writing", +"accessibility", "security"] +classifiers = [ + "Framework :: Sphinx", + "Framework :: Sphinx :: Extension", + "Framework :: Django", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "Development Status :: 1 - Planning", + "Environment :: Console", + "Environment :: Console :: Curses", + "Environment :: Web Environment", + "Environment :: X11 Applications :: Qt", + "Intended Audience :: Customer Service", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: Financial and Insurance Industry", + "Intended Audience :: Healthcare Industry", + "Intended Audience :: Information Technology", + "Intended Audience :: Manufacturing", + "Intended Audience :: Other Audience", + "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", + "Intended Audience :: Telecommunications Industry", + "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Operating System :: Android", + "Operating System :: OS Independent", + "Topic :: Adaptive Technologies", + "Topic :: Artistic Software", + "Topic :: Communications", + "Topic :: Communications :: BBS", + "Topic :: Communications :: Chat", + "Topic :: Communications :: Conferencing", + "Topic :: Communications :: Email", + "Topic :: Communications :: Email :: Address Book", + "Topic :: Communications :: Email :: Email Clients (MUA)", + "Topic :: Communications :: Email :: Filters", + "Topic :: Communications :: Email :: Mail Transport Agents", + "Topic :: Communications :: Email :: Mailing List Servers", + "Topic :: Communications :: Email :: Post-Office", + "Topic :: Communications :: Email :: Post-Office :: IMAP", + "Topic :: Communications :: File Sharing", + "Topic :: Communications :: Internet Phone", + "Topic :: Communications :: Telephony", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", + "Topic :: Education", + "Topic :: Education :: Computer Aided Instruction (CAI)", + "Topic :: Education :: Testing", + "Topic :: Home Automation", + "Topic :: Internet :: File Transfer Protocol (FTP)", + "Topic :: Internet :: WWW/HTTP :: Site Management", + "Topic :: Internet :: XMPP", + "Topic :: Multimedia", + "Topic :: Multimedia :: Sound/Audio :: Capture/Recording", + "Topic :: Multimedia :: Sound/Audio :: Editors", + "Topic :: Multimedia :: Sound/Audio :: Speech", + "Topic :: Multimedia :: Sound/Audio :: Players", + "Topic :: Multimedia :: Video", + "Topic :: Multimedia :: Video :: Capture", + "Topic :: Multimedia :: Video :: Display", + "Topic :: Office/Business", + "Topic :: Office/Business :: Financial", + "Topic :: Office/Business :: Financial :: Accounting", + "Topic :: Office/Business :: Financial :: Accounting", + "Topic :: Office/Business :: Financial :: Point-Of-Sale", + "Topic :: Office/Business :: Financial :: Spreadsheet", + "Topic :: Office/Business :: Groupware", + "Topic :: Office/Business :: News/Diary", + "Topic :: Office/Business :: Office Suites", + "Topic :: Office/Business :: Scheduling", + "Topic :: Other/Nonlisted Topic", + "Topic :: Printing", + "Topic :: Scientific/Engineering", + "Topic :: Security", + "Topic :: Software Development", + "Topic :: Software Development :: Documentation", + "Topic :: Software Development :: Internationalization", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Version Control", + "Topic :: Software Development :: Version Control :: Git", + "Topic :: System :: Systems Administration", + "Topic :: System :: Systems Administration :: Authentication/Directory", + "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP", + "Topic :: Text Editors", + "Topic :: Text Editors :: Documentation", + "Topic :: Text Editors :: Text Processing", + "Topic :: Text Editors :: Word Processors", + "Topic :: Text Processing", + "Topic :: Text Processing :: Markup", + "Topic :: Text Processing :: Markup :: HTML", + "Topic :: Text Processing :: Markup :: Markdown", + "Topic :: Text Processing :: Markup :: reStructuredText" +] + +[project.urls] +homepage = "https://tn.nerv-project.eu" +repository = "https://procrastinator.nerv-project.eu/nerv-project/nervtn-tui" +documentation = "https://tn.nerv-project.eu" +issues = "https://procrastinator.nerv-project.eu/nerv-project/nervtn-tui/issues" +editor = "https://www.nerv-project.eu" +changelog = "https://procrastinator.nerv-project.eu/nerv-project/nervtn-tui/raw/branch/main/CHANGES.rst" + +[project.optional-dependencies] +tests = [ + "tox", + "pytest", + "flake8", + "pylint", + "pytest-cov" +] +setup = [ + "pytest-runner", + "flake8", + "pylint", + "babel", + "flit", +] +doc = [ + "Sphinx", + "sphinx-nervproject-theme", + "sphinxcontrib-actdiag", + "sphinxcontrib-blockdiag", + "sphinxcontrib-nwdiag", + "sphinxcontrib-seqdiag", + "sphinxcontrib-bibtex", + "sphinxemoji", + "sphinx-galleria", + "sphinx-fasvg", + "sphinx-issues", + "sphinx-sitemap", + "sphinx-git" +] + +[project.scripts] + +[project.entry-points."nervtn.client.tui.apps"] + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-ra -q" +testpaths = [ + "tests", +] + +[tool.babel.extract_messages] +mapping_file = "babel.cfg" +output_file = "locale/nervtn.pot" +keywords = ["_", "__", "l_", "lazy_gettext", "gettext", "ngettext"] +add_comments = "Translators:" + +[tool.babel.init_catalog] +domain = "nervtn" +input_file = "locale/nervtn.pot" +output_dir = "locale/" + +[tool.babel.update_catalog] +domain = "nervtn" +input_file = "locale/nervtn.pot" +output_dir = "locale/" + +[tool.babel.compile_catalog] +domain = "nervtn" +directory = "locale/"