python/nxt-python3: Updated for version 3.0.0.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
klaatu 2022-03-09 20:09:55 +13:00 committed by Willy Sudiarto Raharjo
parent 89c42120c1
commit faf41159f3
No known key found for this signature in database
GPG key ID: 3F617144D7238786
7 changed files with 44 additions and 42 deletions

View file

@ -1,10 +0,0 @@
PRGNAM="nxt-python"
VERSION="2.2.2"
HOMEPAGE="https://github.com/Eelviny/nxt-python"
DOWNLOAD="https://github.com/Eelviny/nxt-python/archive/v2.2.2/nxt-python-2.2.2.tar.gz"
MD5SUM="5bd1f018cef143f3c1184847db6a9e1e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="pyusb python2-pybluez"
MAINTAINER="klaatu"
EMAIL="klaatu@member.fsf.org"

View file

@ -1,19 +0,0 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
nxt-python: nxt-python (python module to control Lego NXT)
nxt-python:
nxt-python: nxt-python is a python driver/interface for the Lego Mindstorms NXT
nxt-python: robot.
nxt-python:
nxt-python: http://code.google.com/p/nxt-python/
nxt-python:
nxt-python:
nxt-python:
nxt-python:
nxt-python:

View file

@ -1,8 +1,7 @@
nxt-python (python module to control Lego NXT) nxt-python (python module to control Lego NXT)
nxt-python is a python 2.x driver/interface for the Lego Mindstorms nxt-python is a python 2.x driver/interface for the Lego Mindstorms
NXT robot. Development for this has stalled, so there is no NXT robot.
[complete] Python3 implementation.
Setup Setup
------ ------
@ -16,10 +15,10 @@ group to your system, and add yourself to that group:
You will also want to set up a udev rule to identify NXT hardware and You will also want to set up a udev rule to identify NXT hardware and
grant the 'lego' group permission to use it. grant the 'lego' group permission to use it.
A sample rule is included for you in /usr/share/nxt-python, but you may A sample rule is included for you in /usr/share/python3-nxt-python,
want to verify the vendor code of the NXT unit. but you should verify the vendor code of the NXT unit.
To verify the vendor code, connect the NXT hardware to your computer To verify a vendor code, connect the NXT hardware to your computer
and then run: and then run:
# lsusb # lsusb
@ -34,5 +33,5 @@ over your NXT hardware.
Requires at least one of these Requires at least one of these
------------------------------- -------------------------------
pyusb (for USB communication) python3-pyusb (for USB communication)
pybluez (for bluetooth communication) python3-pybluez (for bluetooth communication)

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Slackware build script for nxt-python # Slackware build script for nxt-python
# Copyright 2014 klaatu @member.fsf.org # Copyright 2014-22 klaatu @member.fsf.org
# GNU All-Permissive License # GNU All-Permissive License
# Copying and distribution of this file, with or without modification, # Copying and distribution of this file, with or without modification,
@ -11,8 +11,9 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nxt-python PRGNAM=python3-nxt-python
VERSION=${VERSION:-2.2.2} SRCNAM=nxt-python
VERSION=${VERSION:-3.0.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -57,7 +58,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz mkdir $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz --strip-components=1 \
-C $PRGNAM-$VERSION
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
@ -66,14 +69,14 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install --root=$PKG python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/share/$PRGNAM-$VERSION mkdir -p $PKG/usr/share/$PRGNAM-$VERSION
cp -ar examples $PKG/usr/share/$PRGNAM-$VERSION cp -ar examples $PKG/usr/share/$PRGNAM-$VERSION
cat $CWD/70-lego.rules > $PKG/usr/share/$PRGNAM-$VERSION/70-lego.rules cat $CWD/70-lego.rules > $PKG/usr/share/$PRGNAM-$VERSION/70-lego.rules
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README LICENSE $PKG/usr/doc/$PRGNAM-$VERSION cp -a README.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install

View file

@ -0,0 +1,10 @@
PRGNAM="python3-nxt-python"
VERSION="3.0.0"
HOMEPAGE="https://github.com/schodet/nxt-python"
DOWNLOAD="https://github.com/schodet/nxt-python/archive/3.0.0/nxt-python-3.0.0.tar.gz"
MD5SUM="6bafd443e4c1bf053becc9e23dc53036"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-pyusb python3-pybluez"
MAINTAINER="klaatu"
EMAIL="klaatu@member.fsf.org"

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
python3-nxt-python: python3-nxt-python (Python3 module to control Lego NXT)
python3-nxt-python:
python3-nxt-python: nxt-python is a Python driver and interface for the
python3-nxt-python: Lego Mindstorms NXT robot.
python3-nxt-python:
python3-nxt-python: https://github.com/schodet/nxt-python
python3-nxt-python:
python3-nxt-python:
python3-nxt-python:
python3-nxt-python:
python3-nxt-python: