From 72d0858ad8a852b0e659d8a57b5330f39106d545 Mon Sep 17 00:00:00 2001 From: gryf Date: Thu, 13 Mar 2025 16:55:40 +0100 Subject: [PATCH] Move from setup.cfg/py to pure pyproject.toml project definition --- MANIFEST.in | 2 -- README.rst | 54 +++++++++++++++++++++++++++++++++++------------- pyproject.toml | 22 ++++++++++---------- requirements.txt | 11 ---------- setup.cfg | 46 ----------------------------------------- setup.py | 4 ---- 6 files changed, 51 insertions(+), 88 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 requirements.txt delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 0c390cf..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -graft ebook_converter/data -exclude .gitignore diff --git a/README.rst b/README.rst index 6675fd5..4208cee 100644 --- a/README.rst +++ b/README.rst @@ -2,19 +2,19 @@ Ebook converter =============== -This is an impudent ripoff of the bits from `Calibre project`_, and is aimed only -for converter thing. +This is an impudent ripoff of the bits from `Calibre project`_, and is aimed +only for converter thing. -My motivation is to have only the converter for ebooks run from the commandline, -without all of those bells and whistles Calibre has, and with cleanest more -*pythonic* approach. +My motivation is to have only the converter for ebooks run from the +commandline, without all of those bells and whistles Calibre has, and with +cleanest more *pythonic* approach. Requirements ------------ To build and run ebook converter, you'll need: -- Python 3.6 or newer +- Python 3.10 or newer - `Liberation fonts`_ - setuptools - ``pdftohtml``, ``pdfinfo`` and ``pdftoppm`` from `poppler`_ project for @@ -22,6 +22,20 @@ To build and run ebook converter, you'll need: - ``libxml2-dev`` and ``libxslt-dev`` as dependencies for format manipulation from some of the Calibre code +and several Python packages: + +- `beautifulsoup4`_ +- `css-parser`_ +- `filelock`_ +- `html2text`_ +- `html5-parser`_ +- `msgpack`_ +- `odfpy`_ +- `pillow`_ +- `python-dateutil`_ +- `setuptools`_ +- `tinycss`_ + No Python2 support. Even if Calibre probably still is able to run on Python2, I do not have an intention to support it. @@ -29,9 +43,9 @@ do not have an intention to support it. What's supported ---------------- -To be able to perform some optimization and make the converter more reliable and -easy to use, first I need to remove some of the features, which are totally not -crucial in my opinion, although they might be re-added later, like, for +To be able to perform some optimization and make the converter more reliable +and easy to use, first I need to remove some of the features, which are totally +not crucial in my opinion, although they might be re-added later, like, for instance there is no automatic language translations depending on the locale settings. @@ -45,9 +59,10 @@ Windows is not currently supported, because of the original spaghetti code. This may change in the future, after cleanup of mentioned pasta would be completed. -So called `Kindle periodical` format is not supported, since all we do care are -local files. If there would be downloaded periodical thing (using Calibre for -example), it would be treated as common book. +So called *Kindle periodical* format (which `Amazon has`_ `killed`_ anyway back +in September 2023) is not supported, since all we do care are local files. If +there would be downloaded periodical thing (using Calibre for example), it +would be treated as common book. Input formats @@ -123,9 +138,20 @@ License This work is licensed on GPL3 license, like the original work. See LICENSE file for details. - .. _Calibre project: https://calibre-ebook.com/ .. _pypi: https://pypi.python.org .. _Liberation fonts: https://github.com/liberationfonts/liberation-fonts -.. _Kindle periodical: https://sellercentral.amazon.com/gp/help/external/help.html?itemID=202047960&language=en-US +.. _Amazon has: https://goodereader.com/blog/kindle/amazon-will-discontinue-newspaper-and-magazine-subscriptions-in-september +.. _killed: https://www.theverge.com/23861370/amazon-kindle-periodicals-unlimited-ended .. _poppler: https://poppler.freedesktop.org/ +.. _beautifulsoup4: https://www.crummy.com/software/BeautifulSoup +.. _css-parser: https://github.com/ebook-utils/css-parser +.. _filelock: https://github.com/tox-dev/py-filelock +.. _html2text: https://github.com/Alir3z4/html2text +.. _html5-parser: https://html5-parser.readthedocs.io +.. _msgpack: https://msgpack.org +.. _odfpy: https://github.com/eea/odfpy +.. _pillow: https://python-pillow.github.io +.. _python-dateutil: https://github.com/dateutil/dateutil +.. _setuptools: https://setuptools.pypa.io +.. _tinycss: http://tinycss.readthedocs.io diff --git a/pyproject.toml b/pyproject.toml index b535a13..7d4d1b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,17 +8,17 @@ version = "4.12.0" requires-python = ">= 3.10" description = "Convert ebook between different formats" dependencies = [ - "filelock", - "python-dateutil", - "lxml", - "css-parser", - "beautifulsoup4", - "tinycss", - "pillow", - "msgpack", - "html5-parser", - "odfpy", - "html2text" + "beautifulsoup4>=4.9.3", + "css-parser>=1.0.6", + "filelock>=3.0.12", + "html2text>=2020.1.16", + "html5-parser==0.4.12", + "msgpack>=1.0.0", + "odfpy>=1.4.1", + "pillow>=8.0.1", + "python-dateutil>=2.8.1", + "setuptools>=61.0", + "tinycss>=0.4" ] readme = "README.rst" authors = [ diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 259b900..0000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -beautifulsoup4>=4.9.3 -css-parser>=1.0.6 -filelock>=3.0.12 -html2text>=2020.1.16 -html5-parser==0.4.9 --no-binary lxml -msgpack>=1.0.0 -odfpy>=1.4.1 -pillow>=8.0.1 -python-dateutil>=2.8.1 -setuptools>=50.3.2 -tinycss>=0.4 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ded1ff5..0000000 --- a/setup.cfg +++ /dev/null @@ -1,46 +0,0 @@ -[metadata] -name = ebook-converter -version = 4.12.0 -summary = Convert ebook between different formats -description-file = - README.rst -author = gryf -author-email = gryf73@gmail.com -license = GPL3 -license_file = LICENSE -url = https://github.com/gryf/ebook-converter -classifier = - Environment :: Console - Intended Audience :: Other Audience - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Operating System :: POSIX :: Linux - Development Status :: 3 - Alpha - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - -[options] -packages = find: -include_package_data = True -install_requires = - filelock - python-dateutil - lxml - css-parser - beautifulsoup4 - tinycss - pillow - msgpack - html5-parser - odfpy - setuptools - html2text - -[options.entry_points] -console_scripts = - ebook-converter=ebook_converter.main:main - -[options.package_data] -* = *.types, *.css, *.html, *.xsl diff --git a/setup.py b/setup.py deleted file mode 100644 index 056ba45..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -import setuptools - - -setuptools.setup()