Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions Mock/GPIO.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""
Mock Library for RPi.GPIO

Copyright (c) 2025 codenio ( Aananth K )
SPDX-License-Identifier: GPL-3.0-only
"""

import os
Expand Down
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 2 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -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/

Expand Down
2 changes: 2 additions & 0 deletions scripts/updatepip.sh
Original file line number Diff line number Diff line change
@@ -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/

Expand Down
22 changes: 13 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions tests/test_mock_gpio.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading