diff --git a/pyproject.toml b/pyproject.toml new file mode 100755 index 0000000..55a3245 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" +[project] +name = "AV-98" +dynamic = ["version"] +description = "Command line Gemini client" +authors = [{name="Solderpunk", email="solderpunk@posteo.net"}] +classifiers = [ + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Communications", + "Intended Audience :: End Users/Desktop", + "Environment :: Console", + "Development Status :: 5 - Production/Stable", +] +[project.urls] +Homepage = "https://tildegit.org/solderpunk/AV-98/" +Issues = "https://tildegit.org/solderpunk/AV-98/issues" +[project.scripts] +av98 = "av98.av98:main" +[project.optional-dependencies] +tofu = ["cryptography"] +colour = ["ansiwrap"] +[tool.setuptools.dynamic] +version = {attr = "av98.__version__"} diff --git a/setup.py b/setup.py deleted file mode 100755 index 210bebd..0000000 --- a/setup.py +++ /dev/null @@ -1,23 +0,0 @@ -from setuptools import setup - -setup( - name='AV-98', - version='1.0.2dev', - description="Command line Gemini client.", - author="Solderpunk", - author_email="solderpunk@sdf.org", - url='https://tildegit.org/solderpunk/AV-98/', - classifiers=[ - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Communications', - 'Intended Audience :: End Users/Desktop', - 'Environment :: Console', - 'Development Status :: 4 - Beta', - ], - py_modules = ["av98"], - entry_points={ - "console_scripts": ["av98=av98:main"] - }, - install_requires=[], -) diff --git a/src/av98/__init__.py b/src/av98/__init__.py new file mode 100644 index 0000000..bda1b9c --- /dev/null +++ b/src/av98/__init__.py @@ -0,0 +1 @@ +__version__ = "1.1.0dev" diff --git a/av98.py b/src/av98/av98.py similarity index 99% rename from av98.py rename to src/av98/av98.py index 95706f5..5981812 100755 --- a/av98.py +++ b/src/av98/av98.py @@ -40,10 +40,11 @@ try: except ModuleNotFoundError: import textwrap -from cache import Cache -from tofu import TofuStore -from clientcerts import ClientCertificateManager -import util +from av98 import __version__ +from av98.cache import Cache +from av98.tofu import TofuStore +from av98.clientcerts import ClientCertificateManager +import av98.util as util _VERSION = "1.1.0dev" @@ -1380,7 +1381,7 @@ current gemini browsing session.""" def do_version(self, line): """Display version information.""" - print("AV-98 " + _VERSION) + print("AV-98 " + __version__) ### The end! def do_quit(self, *args): diff --git a/cache.py b/src/av98/cache.py similarity index 100% rename from cache.py rename to src/av98/cache.py diff --git a/clientcerts.py b/src/av98/clientcerts.py similarity index 99% rename from clientcerts.py rename to src/av98/clientcerts.py index f7c7092..9627100 100644 --- a/clientcerts.py +++ b/src/av98/clientcerts.py @@ -4,7 +4,7 @@ import os import os.path import uuid -import util +import av98.util as util ui_out = logging.getLogger("av98_logger") diff --git a/tofu.py b/src/av98/tofu.py similarity index 100% rename from tofu.py rename to src/av98/tofu.py diff --git a/util.py b/src/av98/util.py similarity index 100% rename from util.py rename to src/av98/util.py