From 514298eb1d530b32c68f309ef8b1adcf497f501d Mon Sep 17 00:00:00 2001 From: codenio Date: Mon, 29 Sep 2025 13:08:03 +0530 Subject: [PATCH] fix ci build error and update readme --- CHANGELOG.md | 7 +++++++ MANIFEST.in | 2 ++ Makefile | 2 ++ Mock/GPIO.py | 3 +++ README.md | 35 +++++++++++++++++++++++------------ pyproject.toml | 6 ++++-- scripts/clean.sh | 2 ++ scripts/install.sh | 2 ++ scripts/updatepip.sh | 2 ++ setup.py | 22 +++++++++++++--------- tests/test_mock_gpio.py | 3 +++ 11 files changed, 63 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 653c95a..41ae107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning where possible. +## [0.2.0] - 2025-09-29 +### Changed +- Minimalized `Makefile` to essential targets. +- `pyproject.toml`: set `dependencies = []` and removed dynamic dependency loading. + This avoids PyPy 3.11 failures from `nh3`/PyO3 in CI. +- Added `tox.ini` and `make tox` for local matrix testing with pyenv. + ## [0.1.10] - 2025-09-29 ### Added - Standard Makefile with targets for install, test, publish, clean, help, etc. diff --git a/MANIFEST.in b/MANIFEST.in index 6f4ba35..e7bedff 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only include README.md include LICENSE recursive-include docs *.html diff --git a/Makefile b/Makefile index 6f473f7..a0608f8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ # Mock.GPIO Makefile +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only .DEFAULT_GOAL := help .PHONY: help install test clean build publish publish-test tox diff --git a/Mock/GPIO.py b/Mock/GPIO.py index af286fc..3b16f87 100644 --- a/Mock/GPIO.py +++ b/Mock/GPIO.py @@ -1,5 +1,8 @@ """ Mock Library for RPi.GPIO + +Copyright (c) 2025 codenio ( Aananth K ) +SPDX-License-Identifier: GPL-3.0-only """ import os diff --git a/README.md b/README.md index 4c164cb..dcbab9c 100644 --- a/README.md +++ b/README.md @@ -41,30 +41,41 @@ GPIO.output(15, GPIO.HIGH) ## Development -This repo includes a standard `Makefile`. +Minimal `Makefile` targets: ```bash -# one-time setup -make requirements +make help # list targets +make install # local install via scripts/install.sh +make test # run pytest +make clean # remove build artifacts +make build # build sdist and wheel +make publish-test # upload to Test PyPI +make publish # upload to PyPI +``` -# run tests -make test +### Test across Python versions (tox + pyenv) -# install locally (editable) -make dev-install +```bash +# install interpreters +pyenv install 3.10.14 3.11.9 3.12.6 3.13.0 pypy3.11-7.3.17 +eval "$(pyenv init -)" +pyenv local 3.10.14 3.11.9 3.12.6 3.13.0 pypy3.11-7.3.17 -# build & publish -make build -make publish-test -make publish +# run tox matrix +make tox ``` -Alternatively, you can use the scripts under `scripts/` directly. +Note: Runtime `dependencies` are intentionally empty to avoid issues on PyPy (e.g., `nh3`/PyO3). Dev and packaging tools are installed separately. ## Contributing Contributions are welcome! Please open an issue or submit a PR. +## Thanks to contributors + +Thanks to all the amazing contributors who make this project better. See the full list on the +[Contributors page](https://github.com/codenio/Mock.GPIO/graphs/contributors). + ## License Licensed under GPL-3.0. See `LICENSE`. diff --git a/pyproject.toml b/pyproject.toml index 263daa3..5441ab4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,6 @@ [build-system] +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only requires = ["setuptools>=61", "wheel"] build-backend = "setuptools.build_meta" @@ -9,7 +11,8 @@ readme = "README.md" license = "GPL-3.0-only" authors = [{ name = "Aananth K", email = "aananthraj1995@gmail.com" }] requires-python = ">=3.8" -dynamic = ["version", "dependencies"] +dynamic = ["version"] +dependencies = [] [project.urls] Homepage = "https://github.com/codenio/Mock.GPIO" @@ -21,7 +24,6 @@ packages = { find = { where = ["."], include = ["Mock*"], exclude = ["tests*"] } [tool.setuptools.dynamic] version = { attr = "Mock.__version__" } -dependencies = { file = ["requirements.txt"] } [tool.pytest.ini_options] minversion = "7.0" diff --git a/scripts/clean.sh b/scripts/clean.sh index 5dc2ff5..4701356 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,3 +1,5 @@ #!/bin/bash +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only rm -rf build/ rm -rf dist/ \ No newline at end of file diff --git a/scripts/install.sh b/scripts/install.sh index c456ba7..c6cba0b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only rm -rf build/ rm -rf dist/ diff --git a/scripts/updatepip.sh b/scripts/updatepip.sh index 218d6e7..8692baa 100755 --- a/scripts/updatepip.sh +++ b/scripts/updatepip.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only rm -rf build/ rm -rf dist/ diff --git a/setup.py b/setup.py index 66afa21..8ff40e9 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,10 @@ +from distutils.util import convert_path + from setuptools import setup, find_packages -from distutils.util import convert_path +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only + long_description = """ # GPIOEmulator @@ -46,18 +50,18 @@ pkg_ns = {} -ver_path = convert_path('Mock/__init__.py') +ver_path = convert_path("Mock/__init__.py") with open(ver_path) as ver_file: exec(ver_file.read(), pkg_ns) setup( - name='Mock.GPIO', - version=pkg_ns['__version__'], - description='Mock Library for RPi.GPIO', - url='https://github.com/codenio/', - author='Aananth K', - author_email='aananthraj1995@gmail.com', - license='GPL-3.0', + name="Mock.GPIO", + version=pkg_ns["__version__"], + description="Mock Library for RPi.GPIO", + url="https://github.com/codenio/", + author="Aananth K", + author_email="aananthraj1995@gmail.com", + license="GPL-3.0", packages=find_packages(exclude=[]), install_requires=[], zip_safe=False, diff --git a/tests/test_mock_gpio.py b/tests/test_mock_gpio.py index fd3b9b4..6f46587 100644 --- a/tests/test_mock_gpio.py +++ b/tests/test_mock_gpio.py @@ -1,4 +1,7 @@ # LOG_LEVEL=Info PYTHONPATH=. uv run pytest +# +# Copyright (c) 2025 codenio ( Aananth K ) +# SPDX-License-Identifier: GPL-3.0-only """ Pytest tests for Mock.GPIO module.