diff --git a/Makefile b/Makefile index 2a7d2d7a..c785edcb 100644 --- a/Makefile +++ b/Makefile @@ -114,8 +114,7 @@ clean-docs: # Packaging -build: - python -m pip install --upgrade pip +build: pip python -m pip install --upgrade build python -m build diff --git a/pyproject.toml b/pyproject.toml index 080ceabf..b171ab6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,75 @@ [build-system] -requires = ["setuptools", "wheel"] +# See: +# - https://setuptools.pypa.io/en/latest/history.html#v66-1-0 +# - https://github.com/pypa/setuptools/issues/3779 +requires = ["setuptools >= 66.1"] build-backend = "setuptools.build_meta" +[project] +dynamic = ["version"] +name = "term-image" +dependencies = [ + "pillow>=9.1,<11", + "requests>=2.23,<3", + "typing_extensions>=4.8,<5", +] +requires-python = ">=3.8" +authors = [ + {name = "Toluwaleke Ogundipe", email = "anonymoux47@gmail.com"}, +] +description = "Display images in the terminal" +readme = "README.md" +license = {text = "MIT License"} +keywords = [ + "image", + "terminal", + "viewer", + "PIL", + "Pillow", + "console", + "xterm", + "library", + "cli", + "tui", + "ANSI", + "ASCII-Art", + "kitty", + "iterm2", + "sixel", + "graphics", +] +classifiers = [ + "Environment :: Console", + "License :: OSI Approved :: MIT License", + "Intended Audience :: Developers", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "Operating System :: Android", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development :: Libraries", + "Topic :: Terminals :: Terminal Emulators/X Terminals", + "Topic :: Multimedia :: Graphics :: Viewers", +] + +[project.urls] +Homepage = "https://github.com/AnonymouX47/term-image" +Documentation = "https://term-image.readthedocs.io/" +Source = "https://github.com/AnonymouX47/term-image" +Repository = "https://github.com/AnonymouX47/term-image.git" +Issues = "https://github.com/AnonymouX47/term-image/issues" +Changelog = "https://github.com/AnonymouX47/term-image/blob/main/CHANGELOG.md" +Funding = "https://github.com/AnonymouX47/term-image#sponsor-this-project" + +[tool.setuptools.dynamic] +version = {attr = "term_image.version_info"} + [tool.mypy] strict = true show_column_numbers = true diff --git a/setup.py b/setup.py deleted file mode 100644 index e862d5a3..00000000 --- a/setup.py +++ /dev/null @@ -1,69 +0,0 @@ -from setuptools import setup - -classifiers = [ - "Environment :: Console", - "License :: OSI Approved :: MIT License", - "Intended Audience :: Developers", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS", - "Operating System :: Android", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development :: Libraries", - "Topic :: Terminals :: Terminal Emulators/X Terminals", - "Topic :: Multimedia :: Graphics :: Viewers", -] - -with open("README.md", "r") as fp: - long_description = fp.read() - -setup( - name="term-image", - version="0.8.0-dev", - author="Toluwaleke Ogundipe", - author_email="anonymoux47@gmail.com", - url="https://github.com/AnonymouX47/term-image", - description="Display images in the terminal", - long_description=long_description, - long_description_content_type="text/markdown", - license="MIT", - classifiers=classifiers, - python_requires=">=3.8", - install_requires=[ - "pillow>=9.1,<11", - "requests>=2.23,<3", - "typing_extensions>=4.8,<5", - ], - include_package_data=True, - project_urls={ - "Changelog": "https://github.com/AnonymouX47/term-image/blob/main/CHANGELOG.md", - "Documentation": "https://term-image.readthedocs.io/", - "Funding": "https://github.com/AnonymouX47/term-image#donate", - "Source": "https://github.com/AnonymouX47/term-image", - "Tracker": "https://github.com/AnonymouX47/term-image/issues", - }, - keywords=[ - "image", - "terminal", - "viewer", - "PIL", - "Pillow", - "console", - "xterm", - "library", - "cli", - "tui", - "ANSI", - "ASCII-Art", - "kitty", - "iterm2", - "sixel", - "graphics", - ], -)