%global _empty_manifest_terminate_build 0 Name: python-gpio Version: 1.0.0 Release: 1 Summary: gpio access via the standard linux sysfs interface License: MIT URL: https://pypi.org/project/gpio/ Source0: https://mirrors.aliyun.com/pypi/web/packages/3d/14/12f7715abee718d57757519edac43ff57370ae5e2aea03cb75fe14fb2ff4/gpio-1.0.0.tar.gz BuildArch: noarch %description # Linux [sysfs](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) gpio access This library provides gpio access via the standard linux [sysfs interface](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) It is intended to mimick [RPIO](http://pythonhosted.org/RPIO/) as much as possible for all features, while also supporting additional (and better named) functionality to the same methods. ## Supported Features - get pin values with `read(pin)` or `input(pin)` - set pin values with `write(pin, value)`, `set(pin, value)` or `output(pin, value)` - get the pin mode with `mode(pin)` - set the pin mode with `setup(pin, mode)` - `mode` can currently equal `gpio.IN` or `gpio.OUT` - create a `GPIOPin` class directly to `write` and `read` a pin ## Examples ### RPi.GPIO Drop-in Good for up to 130KHz pin toggle on a Pi 400. ```python import time import gpio as GPIO GPIO.setup(14, GPIO.OUT) while True: GPIO.output(14, GPIO.HIGH) time.sleep(1.0) GPIO.output(14, GPIO.LOW) time.sleep(1.0) ``` ### Use GPIOPin directly Good for up to 160KHz pin toggle on a Pi 400. This gives you a class instance you can manipulate directly, eliminating the lookup: ```python import gpio pin = gpio.GPIOPin(14, gpio.OUT) while True: pin.write(14, GPIO.HIGH) time.sleep(1.0) pin.write(14, GPIO.LOW) time.sleep(1.0) ``` %package -n python3-gpio Summary: gpio access via the standard linux sysfs interface Provides: python-gpio BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-gpio # Linux [sysfs](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) gpio access This library provides gpio access via the standard linux [sysfs interface](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) It is intended to mimick [RPIO](http://pythonhosted.org/RPIO/) as much as possible for all features, while also supporting additional (and better named) functionality to the same methods. ## Supported Features - get pin values with `read(pin)` or `input(pin)` - set pin values with `write(pin, value)`, `set(pin, value)` or `output(pin, value)` - get the pin mode with `mode(pin)` - set the pin mode with `setup(pin, mode)` - `mode` can currently equal `gpio.IN` or `gpio.OUT` - create a `GPIOPin` class directly to `write` and `read` a pin ## Examples ### RPi.GPIO Drop-in Good for up to 130KHz pin toggle on a Pi 400. ```python import time import gpio as GPIO GPIO.setup(14, GPIO.OUT) while True: GPIO.output(14, GPIO.HIGH) time.sleep(1.0) GPIO.output(14, GPIO.LOW) time.sleep(1.0) ``` ### Use GPIOPin directly Good for up to 160KHz pin toggle on a Pi 400. This gives you a class instance you can manipulate directly, eliminating the lookup: ```python import gpio pin = gpio.GPIOPin(14, gpio.OUT) while True: pin.write(14, GPIO.HIGH) time.sleep(1.0) pin.write(14, GPIO.LOW) time.sleep(1.0) ``` %package help Summary: Development documents and examples for gpio Provides: python3-gpio-doc %description help # Linux [sysfs](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) gpio access This library provides gpio access via the standard linux [sysfs interface](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) It is intended to mimick [RPIO](http://pythonhosted.org/RPIO/) as much as possible for all features, while also supporting additional (and better named) functionality to the same methods. ## Supported Features - get pin values with `read(pin)` or `input(pin)` - set pin values with `write(pin, value)`, `set(pin, value)` or `output(pin, value)` - get the pin mode with `mode(pin)` - set the pin mode with `setup(pin, mode)` - `mode` can currently equal `gpio.IN` or `gpio.OUT` - create a `GPIOPin` class directly to `write` and `read` a pin ## Examples ### RPi.GPIO Drop-in Good for up to 130KHz pin toggle on a Pi 400. ```python import time import gpio as GPIO GPIO.setup(14, GPIO.OUT) while True: GPIO.output(14, GPIO.HIGH) time.sleep(1.0) GPIO.output(14, GPIO.LOW) time.sleep(1.0) ``` ### Use GPIOPin directly Good for up to 160KHz pin toggle on a Pi 400. This gives you a class instance you can manipulate directly, eliminating the lookup: ```python import gpio pin = gpio.GPIOPin(14, gpio.OUT) while True: pin.write(14, GPIO.HIGH) time.sleep(1.0) pin.write(14, GPIO.LOW) time.sleep(1.0) ``` %prep %autosetup -n gpio-1.0.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-gpio -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 1.0.0-1 - Package Spec generated