From a42d0a76813852d1defa4ebcdfe5f0b739edb90b Mon Sep 17 00:00:00 2001 From: robbiemu Date: Tue, 2 Sep 2025 20:34:41 -0400 Subject: [PATCH] modify build process. --- .github/workflows/publish.yml | 2 +- MANIFEST.in | 4 ---- README.md | 2 +- pyproject.toml | 23 ++++++++++++++++------- src/libcrawler/version.py | 4 ++-- 5 files changed, 20 insertions(+), 15 deletions(-) delete mode 100644 MANIFEST.in diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3727aa3..718e45d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,7 +37,7 @@ jobs: - name: Build package run: | # You would normally do 'python -m build sdist' or 'python setup.py sdist bdist_wheel' - python build.py sdist + python -m build sdist - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 4d0a883..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include requirements.txt -include LICENSE -include README.md -include src/libcrawler/version.py diff --git a/README.md b/README.md index caa2622..84e2f58 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Documentation Crawler and Converter v1.0.2 +# Documentation Crawler and Converter v1.0.3 This tool crawls a documentation website and converts the pages into a single Markdown document. It intelligently removes common sections that appear across multiple pages to avoid duplication, including them once at the end of the document. diff --git a/pyproject.toml b/pyproject.toml index 322af68..ec85f64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,32 +1,41 @@ [build-system] -# We remove setuptools-scm because the version is now explicitly sourced from your version.py file. requires = [ "setuptools>=61.0", "wheel" ] build-backend = "setuptools.build_meta" [project] name = "libcrawler" +dynamic = ["version"] description = "A tool to crawl documentation and convert to Markdown." authors = [ { name="Robert Collins", email="roberto.tomas.cuentas@gmail.com" } ] +license = { text = "LGPL-3.0-only" } requires-python = ">=3.7" classifiers = [ "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", ] +# Dependencies are now listed directly here, not in a separate file +dependencies = [ + "aiofiles~=24.1.0", + "beautifulsoup4~=4.12.3", + "datasketch~=1.6.5", + "markdownify~=0.13.1", + "playwright~=1.49.1", + "Requests~=2.32.3" +] -# This tells the build system that version and dependencies are defined elsewhere. -dynamic = ["version", "dependencies"] +[tool.setuptools] +# This tells the build system to automatically include all package data, +# removing the need for MANIFEST.in +include-package-data = true [tool.setuptools.packages.find] where = ["src"] -exclude = ["libcrawler.egg_info", "libcrawler.tests"] -# This new section provides the explicit instructions for finding the dynamic fields. [tool.setuptools.dynamic] +# This tells the build system exactly how to find the version version = {attr = "libcrawler.version.__version__"} -dependencies = {file = ["requirements.txt"]} [project.scripts] crawl-docs = "libcrawler.__main__:main" \ No newline at end of file diff --git a/src/libcrawler/version.py b/src/libcrawler/version.py index 1a6d33d..1e66f16 100644 --- a/src/libcrawler/version.py +++ b/src/libcrawler/version.py @@ -1,2 +1,2 @@ -__version_info__ = ('1', '0', '2') -__version__ = '.'.join(__version_info__) +__version_info__ = ("1", "0", "3") +__version__ = ".".join(__version_info__)