From 8f9aab27c2951c2b261cfbef44eacb03725fbba3 Mon Sep 17 00:00:00 2001 From: Markil 3 Date: Thu, 27 Nov 2025 16:39:00 -0700 Subject: [PATCH] Migrates to a new packaging scheme This is easier to release. --- .gitignore | 2 ++ __main__.py | 20 ------------ pyproject.toml | 23 +++++++++++++- requirements.txt | 1 + setup.py | 29 ------------------ .../comic_download}/Lucida Sans Bold.ttf | Bin .../comic_download}/Lucida Sans.ttf | Bin .../comic_download}/__init__.py | 0 .../comic_download}/__main__.py | 0 .../comic_download}/bluesky.py | 0 .../comic_download}/comic_strip.py | 0 .../comic_download}/existential_comics.py | 0 .../comic_download}/xkcd.py | 0 13 files changed, 25 insertions(+), 50 deletions(-) delete mode 100644 __main__.py delete mode 100644 setup.py rename {comic_download => src/comic_download}/Lucida Sans Bold.ttf (100%) rename {comic_download => src/comic_download}/Lucida Sans.ttf (100%) rename {comic_download => src/comic_download}/__init__.py (100%) rename {comic_download => src/comic_download}/__main__.py (100%) rename {comic_download => src/comic_download}/bluesky.py (100%) rename {comic_download => src/comic_download}/comic_strip.py (100%) rename {comic_download => src/comic_download}/existential_comics.py (100%) rename {comic_download => src/comic_download}/xkcd.py (100%) diff --git a/.gitignore b/.gitignore index b273408..142efed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ *.log **/__pycache__ *~ +src/*.egg-info +dist/ index.json diff --git a/__main__.py b/__main__.py deleted file mode 100644 index f7f0600..0000000 --- a/__main__.py +++ /dev/null @@ -1,20 +0,0 @@ -# This CLI tool allows for the download and packaging of various internet comics into .cbz files. -# Copyright (C) 2025 Markil 3 -# http://www.singlepilot.net -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -from comic_download.__main__ import __main__ - -if __name__ == "__main__": - __main__() diff --git a/pyproject.toml b/pyproject.toml index e3d7c96..f11eadd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,26 @@ [build-system] requires = [ - "setuptools" + "setuptools >= 80.9.0" ] build-backend = "setuptools.build_meta" + +[project] +name = "comic_download" +version = "0.0.1" +authors = [ + {name = "Markil 3", email = "markil3@singlepilot.net"} +] +description = "An application to download comics from various sources to the local hard drive." +readme = "README.md" +keywords = ["comic", "download", "cbz", "ebook"] +dependencies = [ + "requests", + "beautifulsoup4", + "lxml", + "pillow", + "atproto", + "pycryptodome", +] + +[project.scripts] +comic_download = "comic_download.__main__:__main__" diff --git a/requirements.txt b/requirements.txt index 47d75e8..9b5ffab 100755 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ beautifulsoup4 lxml pillow atproto +pycryptodome diff --git a/setup.py b/setup.py deleted file mode 100644 index 7146012..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -from setuptools import find_packages, setup - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - -setup( - name='comic_download', - packages=find_packages(include=['comic_download']), - version='0.0.1', - description='An application to download comics from various sources to the local hard drive.', - long_description=read('README.md'), - long_description_content_type='text/markdown', - author='Copyrate', - license='gpl-3.0', - url='https://git.singlepilot.net/copyrate/ComicDownload', - install_requires=[ - 'requests', - 'beautifulsoup4', - 'lxml', - 'pillow', - 'atproto' - ], - entry_points={ - 'console_scripts': [ - 'comic-download = comic_download.__main__:__main__' - ] - } -) diff --git a/comic_download/Lucida Sans Bold.ttf b/src/comic_download/Lucida Sans Bold.ttf similarity index 100% rename from comic_download/Lucida Sans Bold.ttf rename to src/comic_download/Lucida Sans Bold.ttf diff --git a/comic_download/Lucida Sans.ttf b/src/comic_download/Lucida Sans.ttf similarity index 100% rename from comic_download/Lucida Sans.ttf rename to src/comic_download/Lucida Sans.ttf diff --git a/comic_download/__init__.py b/src/comic_download/__init__.py similarity index 100% rename from comic_download/__init__.py rename to src/comic_download/__init__.py diff --git a/comic_download/__main__.py b/src/comic_download/__main__.py similarity index 100% rename from comic_download/__main__.py rename to src/comic_download/__main__.py diff --git a/comic_download/bluesky.py b/src/comic_download/bluesky.py similarity index 100% rename from comic_download/bluesky.py rename to src/comic_download/bluesky.py diff --git a/comic_download/comic_strip.py b/src/comic_download/comic_strip.py similarity index 100% rename from comic_download/comic_strip.py rename to src/comic_download/comic_strip.py diff --git a/comic_download/existential_comics.py b/src/comic_download/existential_comics.py similarity index 100% rename from comic_download/existential_comics.py rename to src/comic_download/existential_comics.py diff --git a/comic_download/xkcd.py b/src/comic_download/xkcd.py similarity index 100% rename from comic_download/xkcd.py rename to src/comic_download/xkcd.py