From b0daf966886a07e356b4a2bda1db20b978bfcc8d Mon Sep 17 00:00:00 2001 From: Boris Li <65254053+BorisQuanLi@users.noreply.github.com> Date: Sun, 13 Jul 2025 14:03:15 -0400 Subject: [PATCH 1/3] fix: improve setup.py for Python 3.12 compatibility - Add proper requirements.txt parsing with comment filtering - Update package name to follow kebab-case convention - Add python_requires constraint (>=3.8) - Improve version string format (1.0.0) This resolves packaging compatibility issues encountered when installing with pip in Python 3.12+ environments. --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index cbee563..4604035 100644 --- a/setup.py +++ b/setup.py @@ -9,14 +9,15 @@ from setuptools import setup, find_packages with open("requirements.txt") as f: - requirements = f.readlines() + requirements = [line.strip() for line in f.readlines() if line.strip() and not line.startswith('#')] setup( - name="My app", - version="1.0", + name="my-app", + version="1.0.0", description="Python Apache Beam pipeline.", author="My name", author_email="my@email.com", packages=find_packages(), install_requires=requirements, + python_requires=">=3.8", ) From 435795283880d88592905fea9b1bd385ec090f2e Mon Sep 17 00:00:00 2001 From: Boris Li <65254053+BorisQuanLi@users.noreply.github.com> Date: Sun, 13 Jul 2025 19:34:02 -0400 Subject: [PATCH 2/3] docs: align README with setup.py modernization Fix markdown syntax highlighting for installation commands to reflect the improved Python 3.12 compatibility workflow. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e0fbd6..8da23f9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ so any changes or install dependencies are self-contained. As a one time setup, let's install the project's dependencies from the [`requirements.txt`](requirements.txt) file. -```py +```sh # It's always a good idea to update pip before installing dependencies. pip install -U pip From 71ae133d9a263ec5e11e5ac33e54d12dd39f7438 Mon Sep 17 00:00:00 2001 From: Boris Li <65254053+BorisQuanLi@users.noreply.github.com> Date: Mon, 14 Jul 2025 00:01:00 -0400 Subject: [PATCH 3/3] fix(setup.py): require setuptools>=80.9.0 for Python 3.12 compatibility - Add setuptools>=80.9.0 to install_requires to resolve packaging errors in Python 3.12 environments. - Ensures installation works with modern setuptools and avoids canonicalize_version errors. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4604035..9b8ee67 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,6 @@ author="My name", author_email="my@email.com", packages=find_packages(), - install_requires=requirements, + install_requires=requirements + ["setuptools>=80.9.0"], python_requires=">=3.8", )