summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 06:45:22 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 06:45:22 +0000
commitdda2e47b59de4582936f4a0e66db8a2099782295 (patch)
treeac3ecb7e5b34047a0f7b20627fbc260037dc87c1
parent12726c8e7316e34ddf48e6449b08c27438ad35c8 (diff)
automatic import of python-adafruit-ampyopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-adafruit-ampy.spec447
-rw-r--r--sources1
3 files changed, 449 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..94c5a65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/adafruit-ampy-1.1.0.tar.gz
diff --git a/python-adafruit-ampy.spec b/python-adafruit-ampy.spec
new file mode 100644
index 0000000..91dc782
--- /dev/null
+++ b/python-adafruit-ampy.spec
@@ -0,0 +1,447 @@
+%global _empty_manifest_terminate_build 0
+Name: python-adafruit-ampy
+Version: 1.1.0
+Release: 1
+Summary: ampy (Adafruit MicroPython tool) is a command line tool to interact with a CircuitPython or MicroPython board over a serial connection.
+License: MIT
+URL: https://github.com/adafruit/ampy
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cb/4c/a06ed997ecd5d92115becf4689adfb904b1006e749831fde65593b27b638/adafruit-ampy-1.1.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-click
+Requires: python3-pyserial
+Requires: python3-dotenv
+
+%description
+## ampy
+
+MicroPython Tool (ampy) - Utility to interact with a CircuitPython or MicroPython board over a serial connection.
+
+Ampy is meant to be a simple command line tool to manipulate files and run code on a CircuitPython or
+MicroPython board over its serial connection.
+With ampy you can send files from your computer to the
+board's file system, download files from a board to your computer, and even send a Python script
+to a board to be executed.
+
+Note that ampy by design is meant to be simple and does not support advanced interaction like a shell
+or terminal to send input to a board. Check out other MicroPython tools
+like [rshell](https://github.com/dhylands/rshell)
+or [mpfshell](https://github.com/wendlers/mpfshell) for more advanced interaction with boards.
+
+## Installation
+
+You can use ampy with either Python 2.7.x or 3.x and can install it easily from
+Python's package index. On MacOS or Linux, in a terminal run the following command (assuming
+Python 3):
+
+ pip3 install --user adafruit-ampy
+
+On Windows, do:
+
+ pip install adafruit-ampy
+
+Note on some Linux and Mac OSX systems you might need to run as root with sudo:
+
+ sudo pip3 install adafruit-ampy
+
+If you don't have Python 3 then try using Python 2 with:
+
+ pip install adafruit-ampy
+
+Once installed verify you can run the ampy program and get help output:
+
+ ampy --help
+
+You should see usage information displayed like below:
+
+ Usage: ampy [OPTIONS] COMMAND [ARGS]...
+
+ ampy - Adafruit MicroPython Tool
+
+ Ampy is a tool to control MicroPython boards over a serial connection.
+ Using ampy you can manipulate files on the board's internal filesystem and
+ even run scripts.
+
+ Options:
+ -p, --port PORT Name of serial port for connected board. [required]
+ -b, --baud BAUD Baud rate for the serial connection. (default 115200)
+ -d, --delay DELAY Delay in seconds before entering RAW MODE (default 0)
+ --help Show this message and exit.
+
+ Commands:
+ get Retrieve a file from the board.
+ ls List contents of a directory on the board.
+ put Put a file on the board.
+ rm Remove a file from the board.
+ run Run a script and print its output.
+
+If you'd like to install from the Github source then use the standard Python
+setup.py install (or develop mode):
+
+ python3 setup.py install
+
+Note to run the unit tests on Python 2 you must install the mock library:
+
+ pip install mock
+
+## Usage
+
+Ampy is made to talk to a CircuitPython MicroPython board over its serial connection. You will
+need your board connected and any drivers to access it serial port installed.
+Then for example to list the files on the board run a command like:
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls
+
+You should see a list of files on the board's root directory printed to the
+terminal. Note that you'll need to change the port parameter to the name or path
+to the serial port that the MicroPython board is connected to.
+
+Other commands are available, run ampy with --help to see more information:
+
+ ampy --help
+
+Each subcommand has its own help, for example to see help for the ls command run (note you
+unfortunately must have a board connected and serial port specified):
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls --help
+
+## Configuration
+
+For convenience you can set an `AMPY_PORT` environment variable which will be used
+if the port parameter is not specified. For example on Linux or OSX:
+
+ export AMPY_PORT=/dev/tty.SLAB_USBtoUART
+ ampy ls
+
+Or on Windows (untested) try the SET command:
+
+ set AMPY_PORT=COM4
+ ampy ls
+
+Similarly, you can set `AMPY_BAUD` and `AMPY_DELAY` to control your baud rate and
+the delay before entering RAW MODE.
+
+To set these variables automatically each time you run `ampy`, copy them into a
+file named `.ampy`:
+
+```sh
+# Example .ampy file
+# Please fill in your own port, baud rate, and delay
+AMPY_PORT=/dev/cu.wchusbserial1410
+AMPY_BAUD=115200
+# Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
+AMPY_DELAY=0.5
+```
+
+You can put the `.ampy` file in your working directory, one of its parents, or in
+your home directory.
+
+
+
+
+%package -n python3-adafruit-ampy
+Summary: ampy (Adafruit MicroPython tool) is a command line tool to interact with a CircuitPython or MicroPython board over a serial connection.
+Provides: python-adafruit-ampy
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-adafruit-ampy
+## ampy
+
+MicroPython Tool (ampy) - Utility to interact with a CircuitPython or MicroPython board over a serial connection.
+
+Ampy is meant to be a simple command line tool to manipulate files and run code on a CircuitPython or
+MicroPython board over its serial connection.
+With ampy you can send files from your computer to the
+board's file system, download files from a board to your computer, and even send a Python script
+to a board to be executed.
+
+Note that ampy by design is meant to be simple and does not support advanced interaction like a shell
+or terminal to send input to a board. Check out other MicroPython tools
+like [rshell](https://github.com/dhylands/rshell)
+or [mpfshell](https://github.com/wendlers/mpfshell) for more advanced interaction with boards.
+
+## Installation
+
+You can use ampy with either Python 2.7.x or 3.x and can install it easily from
+Python's package index. On MacOS or Linux, in a terminal run the following command (assuming
+Python 3):
+
+ pip3 install --user adafruit-ampy
+
+On Windows, do:
+
+ pip install adafruit-ampy
+
+Note on some Linux and Mac OSX systems you might need to run as root with sudo:
+
+ sudo pip3 install adafruit-ampy
+
+If you don't have Python 3 then try using Python 2 with:
+
+ pip install adafruit-ampy
+
+Once installed verify you can run the ampy program and get help output:
+
+ ampy --help
+
+You should see usage information displayed like below:
+
+ Usage: ampy [OPTIONS] COMMAND [ARGS]...
+
+ ampy - Adafruit MicroPython Tool
+
+ Ampy is a tool to control MicroPython boards over a serial connection.
+ Using ampy you can manipulate files on the board's internal filesystem and
+ even run scripts.
+
+ Options:
+ -p, --port PORT Name of serial port for connected board. [required]
+ -b, --baud BAUD Baud rate for the serial connection. (default 115200)
+ -d, --delay DELAY Delay in seconds before entering RAW MODE (default 0)
+ --help Show this message and exit.
+
+ Commands:
+ get Retrieve a file from the board.
+ ls List contents of a directory on the board.
+ put Put a file on the board.
+ rm Remove a file from the board.
+ run Run a script and print its output.
+
+If you'd like to install from the Github source then use the standard Python
+setup.py install (or develop mode):
+
+ python3 setup.py install
+
+Note to run the unit tests on Python 2 you must install the mock library:
+
+ pip install mock
+
+## Usage
+
+Ampy is made to talk to a CircuitPython MicroPython board over its serial connection. You will
+need your board connected and any drivers to access it serial port installed.
+Then for example to list the files on the board run a command like:
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls
+
+You should see a list of files on the board's root directory printed to the
+terminal. Note that you'll need to change the port parameter to the name or path
+to the serial port that the MicroPython board is connected to.
+
+Other commands are available, run ampy with --help to see more information:
+
+ ampy --help
+
+Each subcommand has its own help, for example to see help for the ls command run (note you
+unfortunately must have a board connected and serial port specified):
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls --help
+
+## Configuration
+
+For convenience you can set an `AMPY_PORT` environment variable which will be used
+if the port parameter is not specified. For example on Linux or OSX:
+
+ export AMPY_PORT=/dev/tty.SLAB_USBtoUART
+ ampy ls
+
+Or on Windows (untested) try the SET command:
+
+ set AMPY_PORT=COM4
+ ampy ls
+
+Similarly, you can set `AMPY_BAUD` and `AMPY_DELAY` to control your baud rate and
+the delay before entering RAW MODE.
+
+To set these variables automatically each time you run `ampy`, copy them into a
+file named `.ampy`:
+
+```sh
+# Example .ampy file
+# Please fill in your own port, baud rate, and delay
+AMPY_PORT=/dev/cu.wchusbserial1410
+AMPY_BAUD=115200
+# Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
+AMPY_DELAY=0.5
+```
+
+You can put the `.ampy` file in your working directory, one of its parents, or in
+your home directory.
+
+
+
+
+%package help
+Summary: Development documents and examples for adafruit-ampy
+Provides: python3-adafruit-ampy-doc
+%description help
+## ampy
+
+MicroPython Tool (ampy) - Utility to interact with a CircuitPython or MicroPython board over a serial connection.
+
+Ampy is meant to be a simple command line tool to manipulate files and run code on a CircuitPython or
+MicroPython board over its serial connection.
+With ampy you can send files from your computer to the
+board's file system, download files from a board to your computer, and even send a Python script
+to a board to be executed.
+
+Note that ampy by design is meant to be simple and does not support advanced interaction like a shell
+or terminal to send input to a board. Check out other MicroPython tools
+like [rshell](https://github.com/dhylands/rshell)
+or [mpfshell](https://github.com/wendlers/mpfshell) for more advanced interaction with boards.
+
+## Installation
+
+You can use ampy with either Python 2.7.x or 3.x and can install it easily from
+Python's package index. On MacOS or Linux, in a terminal run the following command (assuming
+Python 3):
+
+ pip3 install --user adafruit-ampy
+
+On Windows, do:
+
+ pip install adafruit-ampy
+
+Note on some Linux and Mac OSX systems you might need to run as root with sudo:
+
+ sudo pip3 install adafruit-ampy
+
+If you don't have Python 3 then try using Python 2 with:
+
+ pip install adafruit-ampy
+
+Once installed verify you can run the ampy program and get help output:
+
+ ampy --help
+
+You should see usage information displayed like below:
+
+ Usage: ampy [OPTIONS] COMMAND [ARGS]...
+
+ ampy - Adafruit MicroPython Tool
+
+ Ampy is a tool to control MicroPython boards over a serial connection.
+ Using ampy you can manipulate files on the board's internal filesystem and
+ even run scripts.
+
+ Options:
+ -p, --port PORT Name of serial port for connected board. [required]
+ -b, --baud BAUD Baud rate for the serial connection. (default 115200)
+ -d, --delay DELAY Delay in seconds before entering RAW MODE (default 0)
+ --help Show this message and exit.
+
+ Commands:
+ get Retrieve a file from the board.
+ ls List contents of a directory on the board.
+ put Put a file on the board.
+ rm Remove a file from the board.
+ run Run a script and print its output.
+
+If you'd like to install from the Github source then use the standard Python
+setup.py install (or develop mode):
+
+ python3 setup.py install
+
+Note to run the unit tests on Python 2 you must install the mock library:
+
+ pip install mock
+
+## Usage
+
+Ampy is made to talk to a CircuitPython MicroPython board over its serial connection. You will
+need your board connected and any drivers to access it serial port installed.
+Then for example to list the files on the board run a command like:
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls
+
+You should see a list of files on the board's root directory printed to the
+terminal. Note that you'll need to change the port parameter to the name or path
+to the serial port that the MicroPython board is connected to.
+
+Other commands are available, run ampy with --help to see more information:
+
+ ampy --help
+
+Each subcommand has its own help, for example to see help for the ls command run (note you
+unfortunately must have a board connected and serial port specified):
+
+ ampy --port /dev/tty.SLAB_USBtoUART ls --help
+
+## Configuration
+
+For convenience you can set an `AMPY_PORT` environment variable which will be used
+if the port parameter is not specified. For example on Linux or OSX:
+
+ export AMPY_PORT=/dev/tty.SLAB_USBtoUART
+ ampy ls
+
+Or on Windows (untested) try the SET command:
+
+ set AMPY_PORT=COM4
+ ampy ls
+
+Similarly, you can set `AMPY_BAUD` and `AMPY_DELAY` to control your baud rate and
+the delay before entering RAW MODE.
+
+To set these variables automatically each time you run `ampy`, copy them into a
+file named `.ampy`:
+
+```sh
+# Example .ampy file
+# Please fill in your own port, baud rate, and delay
+AMPY_PORT=/dev/cu.wchusbserial1410
+AMPY_BAUD=115200
+# Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
+AMPY_DELAY=0.5
+```
+
+You can put the `.ampy` file in your working directory, one of its parents, or in
+your home directory.
+
+
+
+
+%prep
+%autosetup -n adafruit-ampy-1.1.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-adafruit-ampy -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..451e684
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+4ec0a6cc3105c38dc06d5308a58ad63d adafruit-ampy-1.1.0.tar.gz