mirror of
https://github.com/outbackdingo/klipper-linux.git
synced 2026-01-27 02:19:23 +00:00
First buildable version
This is by no means complete, there's a lot to be done on the setup and configuration side and klipper MCU firmware builds are missing as well. The rootfs itself should be device independent (although you'd probably have to pull in machine specific layers), the image recipe is specific to the ASUS TinkerBoard S. Overall goal is to be able to build this distro for any target that is supported by Yocto. The distro should be "single purpose", i.e. no desktop like Armbian etc, but just provide a minimalistic setup for printing with a possibility to select and upload your klipper config. OctoPrint is included but should be optional (i.e. I'd like to be able to turn it off and just "print from SD" via the local LCD menu. TODOs of the top of my head: * add MCU firmware builds (probably via a multiconfig setup) * add lighttpd with a central entry page and a minimalistic web UI For the web UI: * add a possibility to select existing klipper configs and to upload custom klipper configs * add an option to enable/disable OctoPrint * backup/restore configuration To build for the tinker board: $ source setup.sh targets/tinker-board-s/ $ bitbake klipper-image-tinker-board-s Flashable wic/wic.bmap (use bmaptool) will be located in: klipper-linux-build/build/deploy/images/tinker-board-s
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
downloads/
|
||||
klipper-linux-build/
|
||||
auto.conf
|
||||
bitbake-cookerdaemon.log
|
||||
15
.gitmodules
vendored
Normal file
15
.gitmodules
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
[submodule "yocto/poky"]
|
||||
path = yocto/poky
|
||||
url = git://git.yoctoproject.org/poky.git
|
||||
[submodule "meta-python2"]
|
||||
path = yocto/meta-python2
|
||||
url = git://git.openembedded.org/meta-python2
|
||||
[submodule "yocto/meta-rockchip"]
|
||||
path = yocto/meta-rockchip
|
||||
url = git://git.yoctoproject.org/meta-rockchip
|
||||
[submodule "meta-openembedded"]
|
||||
path = yocto/meta-openembedded
|
||||
url = git://git.openembedded.org/meta-openembedded
|
||||
[submodule "yocto/openembedded-core"]
|
||||
path = yocto/openembedded-core
|
||||
url = git://git.openembedded.org/openembedded-core
|
||||
28
setup.sh
Executable file
28
setup.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
unset BBPATH BBLAYERS BB_ENV_EXTRAWHITE DL_DIR YOCTO_TOPDIR BUILDDIR
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
export YOCTO_TOPDIR=`pwd`
|
||||
|
||||
# get rid of trailing and leading slashes
|
||||
TARGET_CONFIG="$(echo $1 | sed -e 's|^/||' -e 's|/$||')"
|
||||
|
||||
export BBPATH=${YOCTO_TOPDIR}/${TARGET_CONFIG}
|
||||
export BUILDDIR=${YOCTO_TOPDIR}/${TARGET_CONFIG}
|
||||
export DL_DIR=${YOCTO_TOPDIR}/downloads
|
||||
export BB_ENV_EXTRAWHITE="YOCTO_TOPDIR DL_DIR BUILDDIR PYTHONPATH"
|
||||
|
||||
export PATH=${YOCTO_TOPDIR}/yocto/poky/scripts:${YOCTO_TOPDIR}/yocto/poky/bitbake/bin:${PATH}
|
||||
export PYTHONPATH=${YOCTO_TOPDIR}/yocto/poky/bitbake/lib
|
||||
|
||||
if [ ! -d /opt/poky/3.0 ]; then
|
||||
echo "Please install http://downloads.yoctoproject.org/releases/yocto/yocto-3.0/buildtools/x86_64-buildtools-nativesdk-standalone-3.0.sh"
|
||||
else
|
||||
source /opt/poky/3.0/environment-setup-x86_64-pokysdk-linux
|
||||
export PYTHONPATH=$PYTHONPATH:/opt/poky/3.0/sysroots/x86_64-pokysdk-linux/usr/lib/python3.7/site-packages/
|
||||
fi
|
||||
|
||||
echo "Setup complete for $TARGET_CONFIG"
|
||||
|
||||
cd $TARGET_CONFIG
|
||||
17
targets/tinker-board-s/conf/bblayers.conf
Normal file
17
targets/tinker-board-s/conf/bblayers.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
LCONF_VERSION = "7"
|
||||
|
||||
BBLAYERS = " \
|
||||
${YOCTO_TOPDIR}/yocto/poky/meta \
|
||||
${YOCTO_TOPDIR}/yocto/poky/meta-poky \
|
||||
${YOCTO_TOPDIR}/yocto/poky/meta-yocto-bsp \
|
||||
${YOCTO_TOPDIR}/yocto/meta-openembedded/meta-oe \
|
||||
${YOCTO_TOPDIR}/yocto/meta-openembedded/meta-python \
|
||||
${YOCTO_TOPDIR}/yocto/meta-openembedded/meta-perl \
|
||||
${YOCTO_TOPDIR}/yocto/meta-openembedded/meta-networking \
|
||||
${YOCTO_TOPDIR}/yocto/meta-rockchip \
|
||||
${YOCTO_TOPDIR}/yocto/meta-python2 \
|
||||
${YOCTO_TOPDIR}/yocto/meta-klipper \
|
||||
"
|
||||
|
||||
BBMASK = "${YOCTO_TOPDIR}/yocto/meta-maker/recipes-python/werkzeug \
|
||||
${YOCTO_TOPDIR}/yocto/meta-maker/recipes-python/jinja2"
|
||||
13
targets/tinker-board-s/conf/local.conf
Normal file
13
targets/tinker-board-s/conf/local.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
DISTRO = "klipper-linux"
|
||||
MACHINE = "tinker-board-s"
|
||||
|
||||
PRSERV_HOST = "localhost:0"
|
||||
|
||||
PACKAGE_CLASSES = " package_ipk "
|
||||
|
||||
INHERIT += "rm_work"
|
||||
|
||||
TOPDIR = "${YOCTO_TOPDIR}/${DISTRO}-build"
|
||||
TMPDIR = "${TOPDIR}/build"
|
||||
|
||||
IMAGE_FEATURES += "debug-tweaks"
|
||||
22
yocto/meta-klipper/conf/distro/klipper-linux.conf
Normal file
22
yocto/meta-klipper/conf/distro/klipper-linux.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# This distro is based on Poky
|
||||
require conf/distro/poky.conf
|
||||
|
||||
DISTRO = "klipper-linux"
|
||||
DISTRO_NAME = "Klipper 3D Linux Distribution"
|
||||
MAINTAINER = "Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>"
|
||||
|
||||
PACKAGE_CLASSES = "package_ipk"
|
||||
|
||||
GLIBC_GENERATE_LOCALES ?= "en_US.UTF-8"
|
||||
IMAGE_LINGUAS ?= "en-us"
|
||||
|
||||
DISTRO_FEATURES = "ext2 ipv4 ipv6 usbgadget usbhost sysvinit dconfig zeroconf"
|
||||
|
||||
# octoprint depends on some particular versions
|
||||
PREFERRED_VERSION_python-websocket-client = "0.56.0"
|
||||
PREFERRED_VERSION_python-pkginfo = "1.5.0.1"
|
||||
PREFERRED_VERSION_python-jinja2 = "2.8.1"
|
||||
PREFERRED_VERSION_python-flask = "0.12.5"
|
||||
PREFERRED_VERSION_python-pytest = "4.6.6"
|
||||
PREFERRED_VERSION_python-tornado = "4.5.3"
|
||||
|
||||
12
yocto/meta-klipper/conf/layer.conf
Normal file
12
yocto/meta-klipper/conf/layer.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
# prepend to BBPATH so that our classes have higher prio
|
||||
BBPATH =. "${LAYERDIR}:"
|
||||
|
||||
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-klipper"
|
||||
BBFILE_PATTERN_meta-klipper := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-klipper = "10"
|
||||
|
||||
LAYERDEPENDS_meta-klipper = "core openembedded-layer meta-python"
|
||||
|
||||
LAYERSERIES_COMPAT_meta-klipper = "dunfell"
|
||||
11
yocto/meta-klipper/conf/site.conf
Normal file
11
yocto/meta-klipper/conf/site.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
CONF_VERSION="1"
|
||||
|
||||
MODULE_TARBALL_DEPLOY = "0"
|
||||
|
||||
# we want a persistent /var/log
|
||||
VOLATILE_LOG_DIR = "no"
|
||||
|
||||
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=12070
|
||||
do_image_complete[deptask] += "do_populate_lic"
|
||||
|
||||
BB_NUMBER_PARSE_THREADS ?= "${@min(oe.utils.cpu_count(),3)}"
|
||||
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI += "file://tunegroups.cfg"
|
||||
@@ -0,0 +1,3 @@
|
||||
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
|
||||
CONFIG_FEATURE_CHECK_NAMES=y
|
||||
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
|
||||
@@ -0,0 +1,15 @@
|
||||
COMPATIBLE_MACHINE = "tinker-board-s"
|
||||
|
||||
inherit image
|
||||
|
||||
WKS_FILE = "tinker-board-s.wks.in"
|
||||
|
||||
IMAGE_FSTYPES = "wic.bz2 wic.bmap"
|
||||
|
||||
IMAGE_BASENAME = "klipper-image"
|
||||
|
||||
do_image_wic[depends] += "\
|
||||
virtual/bootloader:do_deploy \
|
||||
virtual/kernel:do_deploy \
|
||||
klipper-linux-rootfs:do_image_complete"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
include recipes-core/images/core-image-minimal.bb
|
||||
|
||||
DESCRIPTION = "Klipper Linux rootfs image"
|
||||
IMAGE_FEATURES_append = " package-management ssh-server-dropbear"
|
||||
IMAGE_INSTALL_append = " packagegroup-klipper-image"
|
||||
|
||||
IMAGE_FSTYPES = "ext4 ext4.gz"
|
||||
|
||||
IMAGE_BASENAME = "${PN}"
|
||||
|
||||
IMAGE_ROOTFS_EXTRA_SPACE = "204800"
|
||||
|
||||
inherit extrausers
|
||||
EXTRA_USERS_PARAMS = "\
|
||||
useradd -p \$6\$75uXvknClpLLmi\$SaSiPB9qALjsPn3W43Kn7rtAcW9Gz/fqKJYzAiGBestRPR8t8NyBUvC8OO49T61usTCQZgkDqBfh3GGApWuLP0 printer ; \
|
||||
usermod -a -G klipper,octoprint printer ; \
|
||||
"
|
||||
|
||||
create_extlinux_config() {
|
||||
mkdir -p ${IMAGE_ROOTFS}/boot/extlinux
|
||||
cat > ${IMAGE_ROOTFS}/boot/extlinux/extlinux.conf <<EOF
|
||||
default yocto
|
||||
|
||||
label yocto
|
||||
kernel /boot/${KERNEL_IMAGETYPE}
|
||||
devicetree /boot/${KERNEL_DEVICETREE}
|
||||
append console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p6 rootfstype=ext4 init=/sbin/init
|
||||
EOF
|
||||
}
|
||||
|
||||
ROOTFS_POSTPROCESS_COMMAND_append = " create_extlinux_config;"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
DESCRIPTION = "Klipper image dependency metapackage"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
inherit packagegroup
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
e2fsprogs-e2fsck \
|
||||
e2fsprogs-resize2fs \
|
||||
kernel-image-zimage \
|
||||
kernel-devicetree \
|
||||
klipper \
|
||||
octoprint \
|
||||
"
|
||||
122
yocto/meta-klipper/recipes-devtools/gcc/gcc-configure-common.inc
Normal file
122
yocto/meta-klipper/recipes-devtools/gcc/gcc-configure-common.inc
Normal file
@@ -0,0 +1,122 @@
|
||||
require gcc-multilib-config.inc
|
||||
require gcc-shared-source.inc
|
||||
#
|
||||
# Build the list of lanaguages to build.
|
||||
#
|
||||
# These can be overridden by the version specific .inc file.
|
||||
|
||||
# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
|
||||
FORTRAN ?= ",f77"
|
||||
LANGUAGES ?= "c,c++${FORTRAN}"
|
||||
|
||||
EXTRA_OECONF_BASE ?= ""
|
||||
EXTRA_OECONF_PATHS ?= ""
|
||||
|
||||
GCCMULTILIB ?= "--disable-multilib"
|
||||
GCCTHREADS ?= "posix"
|
||||
|
||||
GCCPIE ??= ""
|
||||
|
||||
SYMVERS_CONF ?= "--enable-symvers=gnu"
|
||||
|
||||
EXTRA_OECONF = "\
|
||||
${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
|
||||
--with-gnu-ld \
|
||||
--enable-shared \
|
||||
--enable-languages=${LANGUAGES} \
|
||||
--enable-threads=${GCCTHREADS} \
|
||||
${GCCMULTILIB} \
|
||||
${GCCPIE} \
|
||||
--enable-c99 \
|
||||
--enable-long-long \
|
||||
${SYMVERS_CONF} \
|
||||
--enable-libstdcxx-pch \
|
||||
--program-prefix=${TARGET_PREFIX} \
|
||||
--without-local-prefix \
|
||||
--disable-install-libiberty \
|
||||
${EXTRA_OECONF_BASE} \
|
||||
${EXTRA_OECONF_GCC_FLOAT} \
|
||||
${EXTRA_OECONF_PATHS} \
|
||||
${@get_gcc_mips_plt_setting(bb, d)} \
|
||||
${@get_gcc_ppc_plt_settings(bb, d)} \
|
||||
${@get_gcc_multiarch_setting(bb, d)} \
|
||||
"
|
||||
|
||||
# glibc version is a minimum controlling whether features are enabled.
|
||||
# Doesn't need to track glibc exactly
|
||||
EXTRA_OECONF_append_libc-glibc = " --with-glibc-version=2.28 "
|
||||
|
||||
# Set this here since GCC configure won't auto-detect and enable
|
||||
# initfini-arry when cross compiling.
|
||||
EXTRA_OECONF_append = " --enable-initfini-array"
|
||||
|
||||
export gcc_cv_collect2_libs = 'none required'
|
||||
# We need to set gcc_cv_collect2_libs else there is cross-compilation badness
|
||||
# in the config.log files (which might not get generated until do_compile
|
||||
# hence being missed by the insane do_configure check).
|
||||
|
||||
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
|
||||
|
||||
EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
|
||||
EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
|
||||
EXTRA_OECONF_append_mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
|
||||
EXTRA_OECONF_append_mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
|
||||
EXTRA_OECONF_append_mipsisa32r6el = " --with-abi=32 --with-arch=mips32r6"
|
||||
EXTRA_OECONF_append_mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6"
|
||||
EXTRA_OECONF_append_mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6"
|
||||
EXTRA_OECONF_append_mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6"
|
||||
|
||||
EXTRA_OECONF_GCC_FLOAT ??= ""
|
||||
CPPFLAGS = ""
|
||||
|
||||
SYSTEMHEADERS = "${target_includedir}"
|
||||
SYSTEMLIBS = "${target_base_libdir}/"
|
||||
SYSTEMLIBS1 = "${target_libdir}/"
|
||||
|
||||
do_configure_prepend () {
|
||||
# teach gcc to find correct target includedir when checking libc ssp support
|
||||
mkdir -p ${B}/gcc
|
||||
echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
|
||||
cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
|
||||
cat >>${B}/gcc/defaults.h.new <<_EOF
|
||||
#define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}"
|
||||
#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
|
||||
#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
|
||||
#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
|
||||
#endif /* ! GCC_DEFAULTS_H */
|
||||
_EOF
|
||||
mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
|
||||
}
|
||||
|
||||
do_configure () {
|
||||
# Setup these vars for cross building only
|
||||
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
|
||||
# gcc build stuff when the build is producing a cross compiler - i.e.
|
||||
# when the 'current' target is the 'host' system, and the host is not
|
||||
# the target (because the build is actually making a cross compiler!)
|
||||
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
|
||||
export CC_FOR_TARGET="${CC}"
|
||||
export GCC_FOR_TARGET="${CC}"
|
||||
export CXX_FOR_TARGET="${CXX}"
|
||||
export AS_FOR_TARGET="${HOST_PREFIX}as"
|
||||
export LD_FOR_TARGET="${HOST_PREFIX}ld"
|
||||
export NM_FOR_TARGET="${HOST_PREFIX}nm"
|
||||
export AR_FOR_TARGET="${HOST_PREFIX}ar"
|
||||
export GFORTRAN_FOR_TARGET="gfortran"
|
||||
export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
|
||||
fi
|
||||
export CC_FOR_BUILD="${BUILD_CC}"
|
||||
export CXX_FOR_BUILD="${BUILD_CXX}"
|
||||
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -fpermissive"
|
||||
export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
|
||||
export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
|
||||
export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
|
||||
export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
|
||||
export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
|
||||
export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
|
||||
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
|
||||
|
||||
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
From 672a75c8417ce08db9e31fc415ec445479231d5a Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Thu, 10 Dec 2015 13:20:30 +0200
|
||||
Subject: [PATCH] Don't search /usr and so on for libraries by default to
|
||||
|
||||
avoid host contamination.
|
||||
|
||||
Upstream-Status: Inappropriate (As the code stands, this is a hack)
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
|
||||
---
|
||||
numpy/distutils/system_info.py | 42 ++++------------------------------
|
||||
1 file changed, 5 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
|
||||
index ba2b1f4..f94dce1 100644
|
||||
--- a/numpy/distutils/system_info.py
|
||||
+++ b/numpy/distutils/system_info.py
|
||||
@@ -278,45 +278,13 @@ if sys.platform == 'win32':
|
||||
add_system_root(os.path.join(conda_dir, 'Library'))
|
||||
|
||||
else:
|
||||
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
|
||||
- '/opt/local/lib', '/sw/lib'], platform_bits)
|
||||
default_runtime_dirs = []
|
||||
- default_include_dirs = ['/usr/local/include',
|
||||
- '/opt/include', '/usr/include',
|
||||
- # path of umfpack under macports
|
||||
- '/opt/local/include/ufsparse',
|
||||
- '/opt/local/include', '/sw/include',
|
||||
- '/usr/include/suitesparse']
|
||||
- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
|
||||
-
|
||||
- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
|
||||
- '/usr/lib'], platform_bits)
|
||||
- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
|
||||
- '/usr/include']
|
||||
-
|
||||
- if os.path.exists('/usr/lib/X11'):
|
||||
- globbed_x11_dir = glob('/usr/lib/*/libX11.so')
|
||||
- if globbed_x11_dir:
|
||||
- x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
|
||||
- default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
|
||||
- default_x11_include_dirs.extend(['/usr/lib/X11/include',
|
||||
- '/usr/include/X11'])
|
||||
-
|
||||
- with open(os.devnull, 'w') as tmp:
|
||||
- try:
|
||||
- p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE,
|
||||
- stderr=tmp)
|
||||
- except (OSError, DistutilsError):
|
||||
- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
|
||||
- # subclass) if an old setuptools bug is triggered (see gh-3160).
|
||||
- pass
|
||||
- else:
|
||||
- triplet = str(p.communicate()[0].decode().strip())
|
||||
- if p.returncode == 0:
|
||||
- # gcc supports the "-print-multiarch" option
|
||||
- default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
|
||||
- default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
|
||||
+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
|
||||
+ default_include_dirs = ['/deaddir/include']
|
||||
+ default_src_dirs = ['.', '/deaddir/src']
|
||||
|
||||
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
|
||||
+ default_x11_include_dirs = ['/deaddir/include']
|
||||
|
||||
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
|
||||
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
|
||||
@@ -0,0 +1,579 @@
|
||||
From c53237f90e4a3a435a20517552186d394d6d09c8 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Thu, 5 Mar 2020 12:02:35 +0800
|
||||
Subject: [PATCH] convert shebang from python to python3
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/numpy/numpy/commit/583901a074dc65145d3d6136ba7dcd02634d680b]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
doc/DISTUTILS.rst.txt | 2 +-
|
||||
doc/cdoc/numpyfilter.py | 2 +-
|
||||
doc/postprocess.py | 2 +-
|
||||
doc/summarize.py | 2 +-
|
||||
numpy/distutils/conv_template.py | 2 +-
|
||||
numpy/distutils/cpuinfo.py | 2 +-
|
||||
numpy/distutils/from_template.py | 2 +-
|
||||
numpy/distutils/setup.py | 2 +-
|
||||
numpy/distutils/system_info.py | 2 +-
|
||||
numpy/f2py/__init__.py | 2 +-
|
||||
numpy/f2py/auxfuncs.py | 2 +-
|
||||
numpy/f2py/capi_maps.py | 2 +-
|
||||
numpy/f2py/cb_rules.py | 2 +-
|
||||
numpy/f2py/cfuncs.py | 2 +-
|
||||
numpy/f2py/common_rules.py | 2 +-
|
||||
numpy/f2py/crackfortran.py | 2 +-
|
||||
numpy/f2py/diagnose.py | 2 +-
|
||||
numpy/f2py/f2py2e.py | 2 +-
|
||||
numpy/f2py/f90mod_rules.py | 2 +-
|
||||
numpy/f2py/func2subr.py | 2 +-
|
||||
numpy/f2py/rules.py | 2 +-
|
||||
numpy/f2py/setup.py | 2 +-
|
||||
numpy/f2py/use_rules.py | 2 +-
|
||||
numpy/linalg/lapack_lite/clapack_scrub.py | 2 +-
|
||||
numpy/linalg/lapack_lite/make_lite.py | 2 +-
|
||||
numpy/ma/bench.py | 2 +-
|
||||
numpy/ma/setup.py | 2 +-
|
||||
numpy/matrixlib/setup.py | 2 +-
|
||||
numpy/random/examples/cython/extending.pyx | 2 +-
|
||||
numpy/random/examples/cython/extending_distributions.pyx | 2 +-
|
||||
numpy/setup.py | 2 +-
|
||||
numpy/testing/print_coercion_tables.py | 2 +-
|
||||
numpy/testing/setup.py | 2 +-
|
||||
runtests.py | 2 +-
|
||||
setup.py | 2 +-
|
||||
tools/c_coverage/c_coverage_report.py | 2 +-
|
||||
tools/changelog.py | 2 +-
|
||||
tools/ci/push_docs_to_repo.py | 2 +-
|
||||
tools/cythonize.py | 2 +-
|
||||
tools/find_deprecated_escaped_characters.py | 2 +-
|
||||
tools/refguide_check.py | 2 +-
|
||||
tools/swig/test/setup.py | 2 +-
|
||||
tools/swig/test/testArray.py | 2 +-
|
||||
tools/swig/test/testFarray.py | 2 +-
|
||||
tools/swig/test/testFlat.py | 2 +-
|
||||
tools/swig/test/testFortran.py | 2 +-
|
||||
tools/swig/test/testMatrix.py | 2 +-
|
||||
tools/swig/test/testSuperTensor.py | 2 +-
|
||||
tools/swig/test/testTensor.py | 2 +-
|
||||
tools/swig/test/testVector.py | 2 +-
|
||||
tools/test-installed-numpy.py | 2 +-
|
||||
51 files changed, 51 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/doc/DISTUTILS.rst.txt b/doc/DISTUTILS.rst.txt
|
||||
index eadde63..2402110 100644
|
||||
--- a/doc/DISTUTILS.rst.txt
|
||||
+++ b/doc/DISTUTILS.rst.txt
|
||||
@@ -59,7 +59,7 @@ SciPy pure Python package example
|
||||
|
||||
Below is an example of a minimal ``setup.py`` file for a pure SciPy package::
|
||||
|
||||
- #!/usr/bin/env python
|
||||
+ #!/usr/bin/env python3
|
||||
def configuration(parent_package='',top_path=None):
|
||||
from numpy.distutils.misc_util import Configuration
|
||||
config = Configuration('mypackage',parent_package,top_path)
|
||||
diff --git a/doc/cdoc/numpyfilter.py b/doc/cdoc/numpyfilter.py
|
||||
index 0ec5069..067bd36 100755
|
||||
--- a/doc/cdoc/numpyfilter.py
|
||||
+++ b/doc/cdoc/numpyfilter.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
numpyfilter.py INPUTFILE
|
||||
|
||||
diff --git a/doc/postprocess.py b/doc/postprocess.py
|
||||
index 2e50c11..1be6f39 100755
|
||||
--- a/doc/postprocess.py
|
||||
+++ b/doc/postprocess.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
%prog MODE FILES...
|
||||
|
||||
diff --git a/doc/summarize.py b/doc/summarize.py
|
||||
index cfce271..563af02 100755
|
||||
--- a/doc/summarize.py
|
||||
+++ b/doc/summarize.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
summarize.py
|
||||
|
||||
diff --git a/numpy/distutils/conv_template.py b/numpy/distutils/conv_template.py
|
||||
index 3bcb7b8..88432c8 100644
|
||||
--- a/numpy/distutils/conv_template.py
|
||||
+++ b/numpy/distutils/conv_template.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
takes templated file .xxx.src and produces .xxx file where .xxx is
|
||||
.i or .c or .h, using the following template rules
|
||||
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py
|
||||
index 5802993..7f6742e 100644
|
||||
--- a/numpy/distutils/cpuinfo.py
|
||||
+++ b/numpy/distutils/cpuinfo.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
cpuinfo
|
||||
|
||||
diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py
|
||||
index c5c1163..af75971 100644
|
||||
--- a/numpy/distutils/from_template.py
|
||||
+++ b/numpy/distutils/from_template.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
process_file(filename)
|
||||
diff --git a/numpy/distutils/setup.py b/numpy/distutils/setup.py
|
||||
index 82a53bd..646921b 100644
|
||||
--- a/numpy/distutils/setup.py
|
||||
+++ b/numpy/distutils/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
def configuration(parent_package='',top_path=None):
|
||||
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
|
||||
index f94dce1..df526f6 100644
|
||||
--- a/numpy/distutils/system_info.py
|
||||
+++ b/numpy/distutils/system_info.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
This file defines a set of system_info classes for getting
|
||||
information about various resources (libraries, library directories,
|
||||
diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py
|
||||
index d146739..0a83b99 100644
|
||||
--- a/numpy/f2py/__init__.py
|
||||
+++ b/numpy/f2py/__init__.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""Fortran to Python Interface Generator.
|
||||
|
||||
"""
|
||||
diff --git a/numpy/f2py/auxfuncs.py b/numpy/f2py/auxfuncs.py
|
||||
index 404bdbd..d23d959 100644
|
||||
--- a/numpy/f2py/auxfuncs.py
|
||||
+++ b/numpy/f2py/auxfuncs.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Auxiliary functions for f2py2e.
|
||||
diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py
|
||||
index c41dd77..a3e2dc2 100644
|
||||
--- a/numpy/f2py/capi_maps.py
|
||||
+++ b/numpy/f2py/capi_maps.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Copyright 1999,2000 Pearu Peterson all rights reserved,
|
||||
diff --git a/numpy/f2py/cb_rules.py b/numpy/f2py/cb_rules.py
|
||||
index 183d7c2..93e93fe 100644
|
||||
--- a/numpy/f2py/cb_rules.py
|
||||
+++ b/numpy/f2py/cb_rules.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Build call-back mechanism for f2py2e.
|
||||
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
|
||||
index d59b630..3847745 100644
|
||||
--- a/numpy/f2py/cfuncs.py
|
||||
+++ b/numpy/f2py/cfuncs.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
C declarations, CPP macros, and C functions for f2py2e.
|
||||
diff --git a/numpy/f2py/common_rules.py b/numpy/f2py/common_rules.py
|
||||
index 62c1ba2..c1825d4 100644
|
||||
--- a/numpy/f2py/common_rules.py
|
||||
+++ b/numpy/f2py/common_rules.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Build common block mechanism for f2py2e.
|
||||
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
|
||||
index 2aaf5d7..fb5ef2f 100755
|
||||
--- a/numpy/f2py/crackfortran.py
|
||||
+++ b/numpy/f2py/crackfortran.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
crackfortran --- read fortran (77,90) code and extract declaration information.
|
||||
|
||||
diff --git a/numpy/f2py/diagnose.py b/numpy/f2py/diagnose.py
|
||||
index 0241fed..6c0304c 100644
|
||||
--- a/numpy/f2py/diagnose.py
|
||||
+++ b/numpy/f2py/diagnose.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import os
|
||||
diff --git a/numpy/f2py/f2py2e.py b/numpy/f2py/f2py2e.py
|
||||
index 110337f..c0789f6 100755
|
||||
--- a/numpy/f2py/f2py2e.py
|
||||
+++ b/numpy/f2py/f2py2e.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
f2py2e - Fortran to Python C/API generator. 2nd Edition.
|
||||
diff --git a/numpy/f2py/f90mod_rules.py b/numpy/f2py/f90mod_rules.py
|
||||
index 85eae80..70be128 100644
|
||||
--- a/numpy/f2py/f90mod_rules.py
|
||||
+++ b/numpy/f2py/f90mod_rules.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Build F90 module support for f2py2e.
|
||||
diff --git a/numpy/f2py/func2subr.py b/numpy/f2py/func2subr.py
|
||||
index 6010d5a..fdea0c2 100644
|
||||
--- a/numpy/f2py/func2subr.py
|
||||
+++ b/numpy/f2py/func2subr.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Rules for building C/API module with f2py2e.
|
||||
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
|
||||
index 1b41498..790d197 100755
|
||||
--- a/numpy/f2py/rules.py
|
||||
+++ b/numpy/f2py/rules.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Rules for building C/API module with f2py2e.
|
||||
diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py
|
||||
index c0c50ce..044c9f2 100644
|
||||
--- a/numpy/f2py/setup.py
|
||||
+++ b/numpy/f2py/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
setup.py for installing F2PY
|
||||
|
||||
diff --git a/numpy/f2py/use_rules.py b/numpy/f2py/use_rules.py
|
||||
index 6f44f16..8214f42 100644
|
||||
--- a/numpy/f2py/use_rules.py
|
||||
+++ b/numpy/f2py/use_rules.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
|
||||
Build 'use others module data' mechanism for f2py2e.
|
||||
diff --git a/numpy/linalg/lapack_lite/clapack_scrub.py b/numpy/linalg/lapack_lite/clapack_scrub.py
|
||||
index 4345861..91e66e7 100644
|
||||
--- a/numpy/linalg/lapack_lite/clapack_scrub.py
|
||||
+++ b/numpy/linalg/lapack_lite/clapack_scrub.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import sys, os
|
||||
diff --git a/numpy/linalg/lapack_lite/make_lite.py b/numpy/linalg/lapack_lite/make_lite.py
|
||||
index 61102d6..0211f4e 100755
|
||||
--- a/numpy/linalg/lapack_lite/make_lite.py
|
||||
+++ b/numpy/linalg/lapack_lite/make_lite.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
Usage: make_lite.py <wrapped_routines_file> <lapack_dir> <output_dir>
|
||||
|
||||
diff --git a/numpy/ma/bench.py b/numpy/ma/bench.py
|
||||
index a9ba42d..a377436 100644
|
||||
--- a/numpy/ma/bench.py
|
||||
+++ b/numpy/ma/bench.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import division, print_function
|
||||
diff --git a/numpy/ma/setup.py b/numpy/ma/setup.py
|
||||
index d1d6c89..a04b79b 100644
|
||||
--- a/numpy/ma/setup.py
|
||||
+++ b/numpy/ma/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
def configuration(parent_package='',top_path=None):
|
||||
diff --git a/numpy/matrixlib/setup.py b/numpy/matrixlib/setup.py
|
||||
index d0981d6..57534d1 100644
|
||||
--- a/numpy/matrixlib/setup.py
|
||||
+++ b/numpy/matrixlib/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
def configuration(parent_package='', top_path=None):
|
||||
diff --git a/numpy/random/examples/cython/extending.pyx b/numpy/random/examples/cython/extending.pyx
|
||||
index a6a4ba4..33f28f9 100644
|
||||
--- a/numpy/random/examples/cython/extending.pyx
|
||||
+++ b/numpy/random/examples/cython/extending.pyx
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#cython: language_level=3
|
||||
|
||||
from libc.stdint cimport uint32_t
|
||||
diff --git a/numpy/random/examples/cython/extending_distributions.pyx b/numpy/random/examples/cython/extending_distributions.pyx
|
||||
index 3cefec9..7a526ab 100644
|
||||
--- a/numpy/random/examples/cython/extending_distributions.pyx
|
||||
+++ b/numpy/random/examples/cython/extending_distributions.pyx
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#cython: language_level=3
|
||||
"""
|
||||
This file shows how the distributions that are accessed through
|
||||
diff --git a/numpy/setup.py b/numpy/setup.py
|
||||
index 4ccdaee..db06c82 100644
|
||||
--- a/numpy/setup.py
|
||||
+++ b/numpy/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
|
||||
diff --git a/numpy/testing/print_coercion_tables.py b/numpy/testing/print_coercion_tables.py
|
||||
index 3a359f4..a9c5363 100755
|
||||
--- a/numpy/testing/print_coercion_tables.py
|
||||
+++ b/numpy/testing/print_coercion_tables.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""Prints type-coercion tables for the built-in NumPy types
|
||||
|
||||
"""
|
||||
diff --git a/numpy/testing/setup.py b/numpy/testing/setup.py
|
||||
index 7c3f2fb..bd315ee 100755
|
||||
--- a/numpy/testing/setup.py
|
||||
+++ b/numpy/testing/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
|
||||
diff --git a/runtests.py b/runtests.py
|
||||
index 23245ae..cafdb92 100755
|
||||
--- a/runtests.py
|
||||
+++ b/runtests.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
runtests.py [OPTIONS] [-- ARGS]
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index a205913..010884f 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
""" NumPy is the fundamental package for array computing with Python.
|
||||
|
||||
It provides:
|
||||
diff --git a/tools/c_coverage/c_coverage_report.py b/tools/c_coverage/c_coverage_report.py
|
||||
index 327f6dc..8837684 100755
|
||||
--- a/tools/c_coverage/c_coverage_report.py
|
||||
+++ b/tools/c_coverage/c_coverage_report.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
A script to create C code-coverage reports based on the output of
|
||||
valgrind's callgrind tool.
|
||||
diff --git a/tools/changelog.py b/tools/changelog.py
|
||||
index b135b14..5d8b33c 100755
|
||||
--- a/tools/changelog.py
|
||||
+++ b/tools/changelog.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- encoding:utf-8 -*-
|
||||
"""
|
||||
Script to generate contributor and pull request lists
|
||||
diff --git a/tools/ci/push_docs_to_repo.py b/tools/ci/push_docs_to_repo.py
|
||||
index a989668..ae53054 100755
|
||||
--- a/tools/ci/push_docs_to_repo.py
|
||||
+++ b/tools/ci/push_docs_to_repo.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
diff --git a/tools/cythonize.py b/tools/cythonize.py
|
||||
index c81b72d..c1d4384 100755
|
||||
--- a/tools/cythonize.py
|
||||
+++ b/tools/cythonize.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
""" cythonize
|
||||
|
||||
Cythonize pyx files into C files as needed.
|
||||
diff --git a/tools/find_deprecated_escaped_characters.py b/tools/find_deprecated_escaped_characters.py
|
||||
index 6f90001..10e0378 100644
|
||||
--- a/tools/find_deprecated_escaped_characters.py
|
||||
+++ b/tools/find_deprecated_escaped_characters.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
r"""
|
||||
Look for escape sequences deprecated in Python 3.6.
|
||||
|
||||
diff --git a/tools/refguide_check.py b/tools/refguide_check.py
|
||||
index c208072..798e322 100644
|
||||
--- a/tools/refguide_check.py
|
||||
+++ b/tools/refguide_check.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""
|
||||
refguide_check.py [OPTIONS] [-- ARGS]
|
||||
|
||||
diff --git a/tools/swig/test/setup.py b/tools/swig/test/setup.py
|
||||
index 4ff870e..f8f05e6 100755
|
||||
--- a/tools/swig/test/setup.py
|
||||
+++ b/tools/swig/test/setup.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testArray.py b/tools/swig/test/testArray.py
|
||||
index 8d9c797..54ffe71 100755
|
||||
--- a/tools/swig/test/testArray.py
|
||||
+++ b/tools/swig/test/testArray.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testFarray.py b/tools/swig/test/testFarray.py
|
||||
index 0037dc9..bedf384 100755
|
||||
--- a/tools/swig/test/testFarray.py
|
||||
+++ b/tools/swig/test/testFarray.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testFlat.py b/tools/swig/test/testFlat.py
|
||||
index 71be277..55034bf 100755
|
||||
--- a/tools/swig/test/testFlat.py
|
||||
+++ b/tools/swig/test/testFlat.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testFortran.py b/tools/swig/test/testFortran.py
|
||||
index 426e894..0f7d0e6 100644
|
||||
--- a/tools/swig/test/testFortran.py
|
||||
+++ b/tools/swig/test/testFortran.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testMatrix.py b/tools/swig/test/testMatrix.py
|
||||
index 065be0d..854a23c 100755
|
||||
--- a/tools/swig/test/testMatrix.py
|
||||
+++ b/tools/swig/test/testMatrix.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testSuperTensor.py b/tools/swig/test/testSuperTensor.py
|
||||
index 97fe80c..31b63d0 100644
|
||||
--- a/tools/swig/test/testSuperTensor.py
|
||||
+++ b/tools/swig/test/testSuperTensor.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testTensor.py b/tools/swig/test/testTensor.py
|
||||
index ac1b749..f47d9e8 100755
|
||||
--- a/tools/swig/test/testTensor.py
|
||||
+++ b/tools/swig/test/testTensor.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/swig/test/testVector.py b/tools/swig/test/testVector.py
|
||||
index 45e763b..067b922 100755
|
||||
--- a/tools/swig/test/testVector.py
|
||||
+++ b/tools/swig/test/testVector.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# System imports
|
||||
diff --git a/tools/test-installed-numpy.py b/tools/test-installed-numpy.py
|
||||
index 5240253..fd7541c 100755
|
||||
--- a/tools/test-installed-numpy.py
|
||||
+++ b/tools/test-installed-numpy.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
# A simple script to test the installed version of numpy by calling
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From b881e0b2ba9cf1a4aa351a1c1ea90b1e1776ce21 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Mon, 12 Aug 2019 15:37:36 +0200
|
||||
Subject: [PATCH] numpy/random/setup.py: remove the detection of x86 targets
|
||||
via uname()
|
||||
|
||||
This was badly breaking compilation for ARM targets (and possibly
|
||||
other non-x86 targets); if -msse2 is desirable for x86 builds it has
|
||||
to be passed through another channel.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
numpy/random/setup.py | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/numpy/random/setup.py b/numpy/random/setup.py
|
||||
index a1bf3b8..60fb534 100644
|
||||
--- a/numpy/random/setup.py
|
||||
+++ b/numpy/random/setup.py
|
||||
@@ -49,11 +49,6 @@ def configuration(parent_package='', top_path=None):
|
||||
elif not is_msvc:
|
||||
# Some bit generators require c99
|
||||
EXTRA_COMPILE_ARGS += ['-std=c99']
|
||||
- INTEL_LIKE = any(arch in platform.machine()
|
||||
- for arch in ('x86', 'i686', 'i386', 'amd64'))
|
||||
- if INTEL_LIKE:
|
||||
- # Assumes GCC or GCC-like compiler
|
||||
- EXTRA_COMPILE_ARGS += ['-msse2']
|
||||
|
||||
# Use legacy integer variable sizes
|
||||
LEGACY_DEFS = [('NP_RANDOM_LEGACY', '1')]
|
||||
@@ -0,0 +1,50 @@
|
||||
SUMMARY = "A sophisticated Numeric Processing Package for Python"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD & MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d26bde5432613cce2334b93985576231"
|
||||
|
||||
SRCNAME = "numpy"
|
||||
|
||||
SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "5e958c603605f3168b7b29f421f64cdd"
|
||||
SRC_URI[sha256sum] = "61562ddac78765969959500b0da9c6f9ba7d77eeb12ec3927afae5303df08777"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
|
||||
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
# Needed for building with gcc 4.x from centos 7
|
||||
CFLAGS_append_class-native = " -std=c99"
|
||||
|
||||
S = "${WORKDIR}/numpy-${PV}"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
|
||||
|
||||
# install what is needed for numpy.test()
|
||||
RDEPENDS_${PN} = "${PYTHON_PN}-unittest \
|
||||
${PYTHON_PN}-difflib \
|
||||
${PYTHON_PN}-pprint \
|
||||
${PYTHON_PN}-pickle \
|
||||
${PYTHON_PN}-shell \
|
||||
${PYTHON_PN}-nose \
|
||||
${PYTHON_PN}-doctest \
|
||||
${PYTHON_PN}-datetime \
|
||||
${PYTHON_PN}-distutils \
|
||||
${PYTHON_PN}-misc \
|
||||
${PYTHON_PN}-mmap \
|
||||
${PYTHON_PN}-netclient \
|
||||
${PYTHON_PN}-numbers \
|
||||
${PYTHON_PN}-pydoc \
|
||||
${PYTHON_PN}-pkgutil \
|
||||
${PYTHON_PN}-email \
|
||||
${PYTHON_PN}-compression \
|
||||
${PYTHON_PN}-ctypes \
|
||||
${PYTHON_PN}-threading \
|
||||
${PYTHON_PN}-multiprocessing \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}_class-native = ""
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,3 @@
|
||||
inherit setuptools
|
||||
require python-numpy.inc
|
||||
|
||||
18
yocto/meta-klipper/recipes-devtools/python/python-nose.inc
Normal file
18
yocto/meta-klipper/recipes-devtools/python/python-nose.inc
Normal file
@@ -0,0 +1,18 @@
|
||||
SUMMARY = "Extends Python unittest to make testing easier"
|
||||
HOMEPAGE = "http://readthedocs.org/docs/nose/"
|
||||
DESCRIPTION = "nose extends the test loading and running features of unittest, \
|
||||
making it easier to write, find and run tests."
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "LGPLv2.1"
|
||||
LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
|
||||
SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
|
||||
|
||||
inherit pypi
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
${PYTHON_PN}-unittest \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,2 @@
|
||||
inherit setuptools
|
||||
require python-nose.inc
|
||||
@@ -0,0 +1,31 @@
|
||||
From fd66df54245e9e67f4d9e96337658ddc707f5ad0 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Orling <ticotimo@gmail.com>
|
||||
Date: Sat, 30 Nov 2019 18:39:15 -0800
|
||||
Subject: [PATCH] setup.py: remove setup_requires for setuptools-scm
|
||||
|
||||
The setup_requires argument forces the download of the egg file for setuptools-scm
|
||||
during the do_compile phase. This download is incompatible with the typical fetch
|
||||
and mirror structure. The only usage of scm is the generation of the _version.py
|
||||
file and in the release tarball it is already correctly created
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Derek Straka <derek@asterius.io>
|
||||
Signed-off-by: Tim Orling <ticotimo@gmail.com>
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 491a6f5..c6af9e2 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -23,7 +23,7 @@ INSTALL_REQUIRES = [
|
||||
def main():
|
||||
setup(
|
||||
use_scm_version={"write_to": "src/_pytest/_version.py"},
|
||||
- setup_requires=["setuptools-scm", "setuptools>=40.0"],
|
||||
+ setup_requires=["setuptools>=40.0"],
|
||||
package_dir={"": "src"},
|
||||
# fmt: off
|
||||
extras_require={
|
||||
@@ -0,0 +1,51 @@
|
||||
Upstream-Status: Inappropriate (OE specific)
|
||||
|
||||
python-pytest: remove fetch during do_compile phase
|
||||
commit: c974fbf9ebf185552ab65301e07af44f36517abf
|
||||
|
||||
introduced an issue by making the version 0.0.0
|
||||
this fixes that
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
Index: pytest-3.2.2/setup.py
|
||||
===================================================================
|
||||
--- pytest-3.2.2.orig/setup.py
|
||||
+++ pytest-3.2.2/setup.py
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
+import re
|
||||
import setuptools
|
||||
import pkg_resources
|
||||
from setuptools import setup, Command
|
||||
@@ -22,6 +23,18 @@ classifiers = [
|
||||
with open('README.rst') as fd:
|
||||
long_description = fd.read()
|
||||
|
||||
+def read(*names, **kwargs):
|
||||
+ with open(os.path.join( *names), 'r') as fp:
|
||||
+ return fp.read()
|
||||
+
|
||||
+def find_version(*file_paths):
|
||||
+ version_file = read(*file_paths)
|
||||
+ version_match = re.search(r"^version = ['\']([^'\"]*)['\']",
|
||||
+ version_file, re.M)
|
||||
+
|
||||
+ if version_match:
|
||||
+ return version_match.group(1)
|
||||
+ raise RuntimeError("Unable to find version string.")
|
||||
|
||||
def get_environment_marker_support_level():
|
||||
"""
|
||||
@@ -59,9 +72,7 @@ def main():
|
||||
name='pytest',
|
||||
description='pytest: simple powerful testing with Python',
|
||||
long_description=long_description,
|
||||
- use_scm_version={
|
||||
- 'write_to': '_pytest/_version.py',
|
||||
- },
|
||||
+ version=find_version("_pytest", "_version.py"),
|
||||
url='http://pytest.org',
|
||||
license='MIT license',
|
||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||
@@ -0,0 +1,49 @@
|
||||
SUMMARY = "Simple powerful teting with python"
|
||||
HOMEPAGE = "http://pytest.org"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=640061b8cee64b308a4d2f9f556c12f2"
|
||||
|
||||
SRC_URI += " file://0001-setup.py-remove-setup_requires-for-setuptools-scm.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "692d9351353ef709c1126266579edd4fd469dcf6b5f4f583050f72161d6f3592"
|
||||
|
||||
inherit update-alternatives pypi setuptools
|
||||
|
||||
RDEPENDS_${PN}_class-target += " \
|
||||
${PYTHON_PN}-argparse \
|
||||
${PYTHON_PN}-atomicwrites \
|
||||
${PYTHON_PN}-attrs \
|
||||
${PYTHON_PN}-compiler \
|
||||
${PYTHON_PN}-debugger \
|
||||
${PYTHON_PN}-doctest \
|
||||
${PYTHON_PN}-funcsigs \
|
||||
${PYTHON_PN}-importlib-metadata \
|
||||
${PYTHON_PN}-json \
|
||||
${PYTHON_PN}-logging \
|
||||
${PYTHON_PN}-more-itertools \
|
||||
${PYTHON_PN}-packaging \
|
||||
${PYTHON_PN}-pathlib2 \
|
||||
${PYTHON_PN}-pluggy \
|
||||
${PYTHON_PN}-py \
|
||||
${PYTHON_PN}-setuptools \
|
||||
${PYTHON_PN}-six \
|
||||
${PYTHON_PN}-wcwidth \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-ptest += "\
|
||||
${PYTHON_PN}-hypothesis \
|
||||
"
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/python-pytest:"
|
||||
|
||||
ALTERNATIVE_${PN} += "py.test pytest"
|
||||
|
||||
NATIVE_LINK_NAME[pytest] = "${bindir}/pytest"
|
||||
ALTERNATIVE_TARGET[pytest] = "${bindir}/pytest"
|
||||
|
||||
ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test"
|
||||
ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test"
|
||||
|
||||
ALTERNATIVE_PRIORITY = "10"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_USB_SERIAL=y
|
||||
CONFIG_USB_SERIAL_CH341=y
|
||||
@@ -0,0 +1,6 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI += "\
|
||||
file://usbserial_ch341.cfg \
|
||||
file://usbannounce.cfg \
|
||||
"
|
||||
Binary file not shown.
@@ -0,0 +1,455 @@
|
||||
From b0705462f569e3f820ee30eb251880b651fe7b56 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
|
||||
Date: Mon, 11 May 2020 17:38:41 +0200
|
||||
Subject: [PATCH 1/3] Attempt to package klippy using setuptools
|
||||
|
||||
I am totally unfamiliar with python packaging, so not sure if there is a
|
||||
better way, but at least it seems to work.
|
||||
|
||||
Custom compilation of c module code was removed, setuptools will take
|
||||
care of that and also allow to cross compile the module.
|
||||
---
|
||||
klippy/__init__.py | 7 +++++++
|
||||
klippy/chelper/__init__.py | 17 -----------------
|
||||
klippy/extras/bed_screws.py | 2 +-
|
||||
klippy/extras/bed_tilt.py | 3 ++-
|
||||
klippy/extras/bltouch.py | 5 +++--
|
||||
klippy/extras/bus.py | 2 +-
|
||||
klippy/extras/delta_calibrate.py | 3 ++-
|
||||
klippy/extras/display/uc1701.py | 3 ++-
|
||||
klippy/extras/endstop_phase.py | 2 +-
|
||||
klippy/extras/extruder_stepper.py | 2 +-
|
||||
klippy/extras/force_move.py | 2 +-
|
||||
klippy/extras/manual_probe.py | 2 +-
|
||||
klippy/extras/manual_stepper.py | 3 ++-
|
||||
klippy/extras/probe.py | 3 ++-
|
||||
klippy/extras/replicape.py | 3 ++-
|
||||
klippy/extras/sx1509.py | 2 +-
|
||||
klippy/extras/z_tilt.py | 3 ++-
|
||||
klippy/kinematics/cartesian.py | 2 +-
|
||||
klippy/kinematics/corexy.py | 2 +-
|
||||
klippy/kinematics/delta.py | 2 +-
|
||||
klippy/kinematics/extruder.py | 2 +-
|
||||
klippy/kinematics/polar.py | 2 +-
|
||||
klippy/kinematics/rotary_delta.py | 2 +-
|
||||
klippy/kinematics/winch.py | 2 +-
|
||||
klippy/klippy.py | 2 +-
|
||||
klippy/toolhead.py | 2 +-
|
||||
setup.py | 27 +++++++++++++++++++++++++++
|
||||
27 files changed, 67 insertions(+), 42 deletions(-)
|
||||
create mode 100644 klippy/__init__.py
|
||||
create mode 100644 setup.py
|
||||
|
||||
diff --git a/klippy/__init__.py b/klippy/__init__.py
|
||||
new file mode 100644
|
||||
index 00000000..b3884662
|
||||
--- /dev/null
|
||||
+++ b/klippy/__init__.py
|
||||
@@ -0,0 +1,7 @@
|
||||
+# Package definition for the extras directory
|
||||
+#
|
||||
+# Copyright (C) 2018 Kevin O'Connor <kevin@koconnor.net>
|
||||
+#
|
||||
+# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
+
|
||||
+__all__ = [ 'chelper', 'extras', 'kinematics' ]
|
||||
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
|
||||
index 1a4b2d74..14e115f8 100644
|
||||
--- a/klippy/chelper/__init__.py
|
||||
+++ b/klippy/chelper/__init__.py
|
||||
@@ -162,20 +162,6 @@ def get_mtimes(srcdir, filelist):
|
||||
out.append(t)
|
||||
return out
|
||||
|
||||
-# Check if the code needs to be compiled
|
||||
-def check_build_code(srcdir, target, sources, cmd, other_files=[]):
|
||||
- src_times = get_mtimes(srcdir, sources + other_files)
|
||||
- obj_times = get_mtimes(srcdir, [target])
|
||||
- if not obj_times or max(src_times) > min(obj_times):
|
||||
- logging.info("Building C code module %s", target)
|
||||
- srcfiles = [os.path.join(srcdir, fname) for fname in sources]
|
||||
- destlib = os.path.join(srcdir, target)
|
||||
- res = os.system(cmd % (destlib, ' '.join(srcfiles)))
|
||||
- if res:
|
||||
- msg = "Unable to build C code module (error=%s)" % (res,)
|
||||
- logging.error(msg)
|
||||
- raise Exception(msg)
|
||||
-
|
||||
FFI_main = None
|
||||
FFI_lib = None
|
||||
pyhelper_logging_callback = None
|
||||
@@ -185,8 +171,6 @@ def get_ffi():
|
||||
global FFI_main, FFI_lib, pyhelper_logging_callback
|
||||
if FFI_lib is None:
|
||||
srcdir = os.path.dirname(os.path.realpath(__file__))
|
||||
- check_build_code(srcdir, DEST_LIB, SOURCE_FILES, COMPILE_CMD
|
||||
- , OTHER_FILES)
|
||||
FFI_main = cffi.FFI()
|
||||
for d in defs_all:
|
||||
FFI_main.cdef(d)
|
||||
@@ -213,7 +197,6 @@ HC_CMD = "sudo %s/hub-ctrl -h 0 -P 2 -p %d"
|
||||
def run_hub_ctrl(enable_power):
|
||||
srcdir = os.path.dirname(os.path.realpath(__file__))
|
||||
hubdir = os.path.join(srcdir, HC_SOURCE_DIR)
|
||||
- check_build_code(hubdir, HC_TARGET, HC_SOURCE_FILES, HC_COMPILE_CMD)
|
||||
os.system(HC_CMD % (hubdir, enable_power))
|
||||
|
||||
|
||||
diff --git a/klippy/extras/bed_screws.py b/klippy/extras/bed_screws.py
|
||||
index c10a791f..ee5a13ca 100644
|
||||
--- a/klippy/extras/bed_screws.py
|
||||
+++ b/klippy/extras/bed_screws.py
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2019 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import homing
|
||||
+from klippy import homing
|
||||
|
||||
def parse_coord(config, param):
|
||||
pair = config.get(param).strip().split(',', 1)
|
||||
diff --git a/klippy/extras/bed_tilt.py b/klippy/extras/bed_tilt.py
|
||||
index 910b40a9..7b66f759 100644
|
||||
--- a/klippy/extras/bed_tilt.py
|
||||
+++ b/klippy/extras/bed_tilt.py
|
||||
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import probe, mathutil
|
||||
+import probe
|
||||
+from klippy import mathutil
|
||||
|
||||
class BedTilt:
|
||||
def __init__(self, config):
|
||||
diff --git a/klippy/extras/bltouch.py b/klippy/extras/bltouch.py
|
||||
index 8e9166bd..1c2bb094 100644
|
||||
--- a/klippy/extras/bltouch.py
|
||||
+++ b/klippy/extras/bltouch.py
|
||||
@@ -3,8 +3,9 @@
|
||||
# Copyright (C) 2018-2020 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import logging
|
||||
-import homing, probe
|
||||
+import math, logging
|
||||
+from klippy import homing
|
||||
+import probe
|
||||
|
||||
SIGNAL_PERIOD = 0.020
|
||||
MIN_CMD_TIME = 5 * SIGNAL_PERIOD
|
||||
diff --git a/klippy/extras/bus.py b/klippy/extras/bus.py
|
||||
index 7c6ae440..91c84a4e 100644
|
||||
--- a/klippy/extras/bus.py
|
||||
+++ b/klippy/extras/bus.py
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2018,2019 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import mcu
|
||||
+from klippy import mcu
|
||||
|
||||
def resolve_bus_name(mcu, param, bus):
|
||||
# Find enumerations for the given bus
|
||||
diff --git a/klippy/extras/delta_calibrate.py b/klippy/extras/delta_calibrate.py
|
||||
index abea7cc6..2e6c862a 100644
|
||||
--- a/klippy/extras/delta_calibrate.py
|
||||
+++ b/klippy/extras/delta_calibrate.py
|
||||
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging, collections
|
||||
-import probe, mathutil
|
||||
+import probe
|
||||
+from klippy import mathutil
|
||||
|
||||
# A "stable position" is a 3-tuple containing the number of steps
|
||||
# taken since hitting the endstop on each delta tower. Delta
|
||||
diff --git a/klippy/extras/display/uc1701.py b/klippy/extras/display/uc1701.py
|
||||
index f19d9f97..b5b1cf10 100644
|
||||
--- a/klippy/extras/display/uc1701.py
|
||||
+++ b/klippy/extras/display/uc1701.py
|
||||
@@ -5,7 +5,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import icons, font8x14, extras.bus
|
||||
+import icons, font8x14
|
||||
+from klippy.extras import bus
|
||||
|
||||
BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000
|
||||
|
||||
diff --git a/klippy/extras/endstop_phase.py b/klippy/extras/endstop_phase.py
|
||||
index 8cfea7fd..f6e75fe2 100644
|
||||
--- a/klippy/extras/endstop_phase.py
|
||||
+++ b/klippy/extras/endstop_phase.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
-import homing
|
||||
+from klippy import homing
|
||||
|
||||
TRINAMIC_DRIVERS = ["tmc2130", "tmc2208", "tmc2209", "tmc2660", "tmc5160"]
|
||||
|
||||
diff --git a/klippy/extras/extruder_stepper.py b/klippy/extras/extruder_stepper.py
|
||||
index f6d0e9ea..74b2e956 100644
|
||||
--- a/klippy/extras/extruder_stepper.py
|
||||
+++ b/klippy/extras/extruder_stepper.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import stepper
|
||||
+from klippy import stepper
|
||||
|
||||
class ExtruderStepper:
|
||||
def __init__(self, config):
|
||||
diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py
|
||||
index 647b0b33..b2247833 100644
|
||||
--- a/klippy/extras/force_move.py
|
||||
+++ b/klippy/extras/force_move.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
-import chelper
|
||||
+from klippy import chelper
|
||||
|
||||
BUZZ_DISTANCE = 1.
|
||||
BUZZ_VELOCITY = BUZZ_DISTANCE / .250
|
||||
diff --git a/klippy/extras/manual_probe.py b/klippy/extras/manual_probe.py
|
||||
index 663f3c8e..f696a0ae 100644
|
||||
--- a/klippy/extras/manual_probe.py
|
||||
+++ b/klippy/extras/manual_probe.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, bisect
|
||||
-import homing
|
||||
+from klippy import homing
|
||||
|
||||
class ManualProbe:
|
||||
def __init__(self, config):
|
||||
diff --git a/klippy/extras/manual_stepper.py b/klippy/extras/manual_stepper.py
|
||||
index c549a951..92ac24a3 100644
|
||||
--- a/klippy/extras/manual_stepper.py
|
||||
+++ b/klippy/extras/manual_stepper.py
|
||||
@@ -3,7 +3,8 @@
|
||||
# Copyright (C) 2019 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import stepper, homing, force_move, chelper
|
||||
+import force_move
|
||||
+from klippy import stepper, homing, chelper
|
||||
|
||||
ENDSTOP_SAMPLE_TIME = .000015
|
||||
ENDSTOP_SAMPLE_COUNT = 4
|
||||
diff --git a/klippy/extras/probe.py b/klippy/extras/probe.py
|
||||
index e58b6080..121efe78 100644
|
||||
--- a/klippy/extras/probe.py
|
||||
+++ b/klippy/extras/probe.py
|
||||
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import pins, homing, manual_probe
|
||||
+from klippy import pins, homing
|
||||
+import manual_probe
|
||||
|
||||
HINT_TIMEOUT = """
|
||||
Make sure to home the printer before probing. If the probe
|
||||
diff --git a/klippy/extras/replicape.py b/klippy/extras/replicape.py
|
||||
index 5938502e..907cb46f 100644
|
||||
--- a/klippy/extras/replicape.py
|
||||
+++ b/klippy/extras/replicape.py
|
||||
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, os
|
||||
-import pins, mcu, bus
|
||||
+from klippy import pins, mcu
|
||||
+import bus
|
||||
|
||||
REPLICAPE_MAX_CURRENT = 3.84
|
||||
REPLICAPE_PCA9685_BUS = 2
|
||||
diff --git a/klippy/extras/sx1509.py b/klippy/extras/sx1509.py
|
||||
index 27f335c9..3f38337c 100644
|
||||
--- a/klippy/extras/sx1509.py
|
||||
+++ b/klippy/extras/sx1509.py
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2018 Florian Heilmann <Florian.Heilmann@gmx.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import pins
|
||||
+from klippy import pins
|
||||
import bus
|
||||
|
||||
# Word registers
|
||||
diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py
|
||||
index ef69c0e6..00b19699 100644
|
||||
--- a/klippy/extras/z_tilt.py
|
||||
+++ b/klippy/extras/z_tilt.py
|
||||
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import probe, mathutil
|
||||
+import probe
|
||||
+from klippy import mathutil
|
||||
|
||||
class ZAdjustHelper:
|
||||
def __init__(self, config, z_count):
|
||||
diff --git a/klippy/kinematics/cartesian.py b/klippy/kinematics/cartesian.py
|
||||
index df57edce..b400bd1d 100644
|
||||
--- a/klippy/kinematics/cartesian.py
|
||||
+++ b/klippy/kinematics/cartesian.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
-import stepper, homing
|
||||
+from klippy import stepper, homing
|
||||
|
||||
class CartKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
diff --git a/klippy/kinematics/corexy.py b/klippy/kinematics/corexy.py
|
||||
index f04b3009..2da29c97 100644
|
||||
--- a/klippy/kinematics/corexy.py
|
||||
+++ b/klippy/kinematics/corexy.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
-import stepper, homing
|
||||
+from klippy import stepper, homing
|
||||
|
||||
class CoreXYKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py
|
||||
index 885ce940..1c334547 100644
|
||||
--- a/klippy/kinematics/delta.py
|
||||
+++ b/klippy/kinematics/delta.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
-import stepper, homing, mathutil
|
||||
+from klippy import stepper, homing, mathutil
|
||||
|
||||
# Slow moves once the ratio of tower to XY movement exceeds SLOW_RATIO
|
||||
SLOW_RATIO = 3.
|
||||
diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py
|
||||
index c0ba299c..d314cdc3 100644
|
||||
--- a/klippy/kinematics/extruder.py
|
||||
+++ b/klippy/kinematics/extruder.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
-import stepper, homing, chelper
|
||||
+from klippy import stepper, homing, chelper
|
||||
|
||||
class PrinterExtruder:
|
||||
def __init__(self, config, extruder_num):
|
||||
diff --git a/klippy/kinematics/polar.py b/klippy/kinematics/polar.py
|
||||
index e3ee3241..f2643552 100644
|
||||
--- a/klippy/kinematics/polar.py
|
||||
+++ b/klippy/kinematics/polar.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
-import stepper, homing
|
||||
+from klippy import stepper, homing
|
||||
|
||||
class PolarKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
diff --git a/klippy/kinematics/rotary_delta.py b/klippy/kinematics/rotary_delta.py
|
||||
index 415a2e7f..ff62ba49 100644
|
||||
--- a/klippy/kinematics/rotary_delta.py
|
||||
+++ b/klippy/kinematics/rotary_delta.py
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
-import stepper, homing, mathutil, chelper
|
||||
+from klippy import stepper, homing, mathutil, chelper
|
||||
|
||||
class RotaryDeltaKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
diff --git a/klippy/kinematics/winch.py b/klippy/kinematics/winch.py
|
||||
index 04e2d498..4de65d58 100644
|
||||
--- a/klippy/kinematics/winch.py
|
||||
+++ b/klippy/kinematics/winch.py
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net>
|
||||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
-import stepper, mathutil
|
||||
+from klippy import stepper, mathutil
|
||||
|
||||
class WinchKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
diff --git a/klippy/klippy.py b/klippy/klippy.py
|
||||
index 84450aea..091dbc3c 100644
|
||||
--- a/klippy/klippy.py
|
||||
+++ b/klippy/klippy.py
|
||||
@@ -106,7 +106,7 @@ class Printer:
|
||||
if default is not configfile.sentinel:
|
||||
return default
|
||||
raise self.config_error("Unable to load module '%s'" % (section,))
|
||||
- mod = importlib.import_module('extras.' + module_name)
|
||||
+ mod = importlib.import_module('klippy.extras.' + module_name)
|
||||
init_func = 'load_config'
|
||||
if len(module_parts) > 1:
|
||||
init_func = 'load_config_prefix'
|
||||
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
|
||||
index cf8fba4a..e811a467 100644
|
||||
--- a/klippy/toolhead.py
|
||||
+++ b/klippy/toolhead.py
|
||||
@@ -250,7 +250,7 @@ class ToolHead:
|
||||
self.extruder = kinematics.extruder.DummyExtruder()
|
||||
kin_name = config.get('kinematics')
|
||||
try:
|
||||
- mod = importlib.import_module('kinematics.' + kin_name)
|
||||
+ mod = importlib.import_module('klippy.kinematics.' + kin_name)
|
||||
self.kin = mod.load_kinematics(self, config)
|
||||
except config.error as e:
|
||||
raise
|
||||
diff --git a/setup.py b/setup.py
|
||||
new file mode 100644
|
||||
index 00000000..faa2d895
|
||||
--- /dev/null
|
||||
+++ b/setup.py
|
||||
@@ -0,0 +1,27 @@
|
||||
+from setuptools import setup, find_packages, Extension
|
||||
+
|
||||
+c_helper = Extension('klippy/chelper/c_helper',
|
||||
+ define_macros = [('MAJOR_VERSION', '1'),
|
||||
+ ('MINOR_VERSION', '0')],
|
||||
+ sources = [ 'klippy/chelper/itersolve.c',
|
||||
+ 'klippy/chelper/kin_cartesian.c',
|
||||
+ 'klippy/chelper/kin_corexy.c',
|
||||
+ 'klippy/chelper/kin_delta.c',
|
||||
+ 'klippy/chelper/kin_extruder.c',
|
||||
+ 'klippy/chelper/kin_polar.c',
|
||||
+ 'klippy/chelper/kin_rotary_delta.c',
|
||||
+ 'klippy/chelper/kin_winch.c',
|
||||
+ 'klippy/chelper/pyhelper.c',
|
||||
+ 'klippy/chelper/serialqueue.c',
|
||||
+ 'klippy/chelper/stepcompress.c',
|
||||
+ 'klippy/chelper/trapq.c' ])
|
||||
+
|
||||
+setup(
|
||||
+ name = 'klipper',
|
||||
+ version = '0.8.0+git',
|
||||
+ description = 'Klipper 3D Printing Firmware',
|
||||
+ packages=find_packages(),
|
||||
+ entry_points = { "console_scripts": [ "klippy = klippy.klippy:main" ] },
|
||||
+ url = "https://www.klipper3d.org/",
|
||||
+ ext_modules = [ c_helper ]
|
||||
+)
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 4fe5073b0220df48a0ead9118745c79a0e1eee2b Mon Sep 17 00:00:00 2001
|
||||
From: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
|
||||
Date: Mon, 11 May 2020 17:49:27 +0200
|
||||
Subject: [PATCH 2/3] Assume hub-ctrl is installed on the system and is in
|
||||
$PATH
|
||||
|
||||
---
|
||||
klippy/chelper/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
|
||||
index 14e115f8..63f1ba07 100644
|
||||
--- a/klippy/chelper/__init__.py
|
||||
+++ b/klippy/chelper/__init__.py
|
||||
@@ -192,7 +192,7 @@ HC_COMPILE_CMD = "gcc -Wall -g -O2 -o %s %s -lusb"
|
||||
HC_SOURCE_FILES = ['hub-ctrl.c']
|
||||
HC_SOURCE_DIR = '../../lib/hub-ctrl'
|
||||
HC_TARGET = "hub-ctrl"
|
||||
-HC_CMD = "sudo %s/hub-ctrl -h 0 -P 2 -p %d"
|
||||
+HC_CMD = "hub-ctrl -h 0 -P 2 -p %d"
|
||||
|
||||
def run_hub_ctrl(enable_power):
|
||||
srcdir = os.path.dirname(os.path.realpath(__file__))
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From d01c56d64db32953a035ca1be6ee191325646028 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
|
||||
Date: Mon, 11 May 2020 18:07:54 +0200
|
||||
Subject: [PATCH 3/3] Make sure to also distribute menu.cfg
|
||||
|
||||
---
|
||||
MANIFEST.in | 2 ++
|
||||
setup.py | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
create mode 100644 MANIFEST.in
|
||||
|
||||
diff --git a/MANIFEST.in b/MANIFEST.in
|
||||
new file mode 100644
|
||||
index 00000000..8e306491
|
||||
--- /dev/null
|
||||
+++ b/MANIFEST.in
|
||||
@@ -0,0 +1,2 @@
|
||||
+include klippy/extras/display/menu.cfg
|
||||
+include klippy/extras/display/display.cfg
|
||||
diff --git a/setup.py b/setup.py
|
||||
index faa2d895..25a7da1b 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -21,6 +21,7 @@ setup(
|
||||
version = '0.8.0+git',
|
||||
description = 'Klipper 3D Printing Firmware',
|
||||
packages=find_packages(),
|
||||
+ include_package_data = True,
|
||||
entry_points = { "console_scripts": [ "klippy = klippy.klippy:main" ] },
|
||||
url = "https://www.klipper3d.org/",
|
||||
ext_modules = [ c_helper ]
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Configuration for /etc/init.d/klipper
|
||||
|
||||
PRINTER_CONFIG="printer.cfg"
|
||||
|
||||
57
yocto/meta-klipper/recipes-printing/klipper/files/klipper.init
Executable file
57
yocto/meta-klipper/recipes-printing/klipper/files/klipper.init
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# System startup script for Klipper 3d-printer host code
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: klipper
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Klipper daemon
|
||||
# Description: Starts the Klipper daemon.
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
DESC="klipper daemon"
|
||||
NAME="klipper"
|
||||
DEFAULTS_FILE=/etc/default/klipper
|
||||
PIDFILE=/var/run/klipper.pid
|
||||
|
||||
LOGDIR=/var/log/klipper
|
||||
mkdir -p $LOGDIR
|
||||
chown -R klipper.klipper $LOGDIR
|
||||
|
||||
PRINTER_CONFIG="printer.cfg"
|
||||
|
||||
# Read defaults file
|
||||
[ -r $DEFAULTS_FILE ] && . $DEFAULTS_FILE
|
||||
|
||||
case "$1" in
|
||||
start) echo -n "Starting klipper" $NAME
|
||||
start-stop-daemon --start --quiet --exec klippy \
|
||||
--background --pidfile $PIDFILE --make-pidfile \
|
||||
--chuid klipper:klipper \
|
||||
-- /etc/klipper/$PRINTER_CONFIG -l /var/log/klipper.log
|
||||
echo " $?"
|
||||
;;
|
||||
stop) echo -n "Stopping klipper" $NAME
|
||||
if [ -s $PIDFILE ]; then
|
||||
kill -INT $(cat $PIDFILE)
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE
|
||||
echo " $RETVAL"
|
||||
fi
|
||||
;;
|
||||
restart) echo -n "Restarting klipper" $NAME
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
reload|force-reload)
|
||||
echo -n "Reloading configuration not supported" $NAME
|
||||
echo 1
|
||||
;;
|
||||
*) echo "Usage: /etc/init.d/klipper {start|stop|restart|reload|force-reload}"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
65
yocto/meta-klipper/recipes-printing/klipper/klipper_git.bb
Normal file
65
yocto/meta-klipper/recipes-printing/klipper/klipper_git.bb
Normal file
@@ -0,0 +1,65 @@
|
||||
DESCRIPTION = "Klipper 3D Printing Software"
|
||||
HOMEPAGE = "https://www.klipper3d.org/"
|
||||
LICENSE = "GPL-3.0"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
inherit setuptools update-rc.d pkgconfig useradd
|
||||
|
||||
# setting "DEPENDS =" will break setuptools, make sure to append
|
||||
DEPENDS += "libusb"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/KevinOConnor/klipper.git;protocol=https \
|
||||
file://0001-Attempt-to-package-klippy-using-setuptools.patch \
|
||||
file://0002-Assume-hub-ctrl-is-installed-on-the-system-and-is-in.patch \
|
||||
file://0003-Make-sure-to-also-distribute-menu.cfg.patch \
|
||||
file://klipper.init \
|
||||
file://klipper.default \
|
||||
"
|
||||
|
||||
SRCREV = "${AUTOREV}"
|
||||
PV = "0.8.0+gitr${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
python \
|
||||
python-pyserial \
|
||||
python-cffi \
|
||||
python-greenlet \
|
||||
python-jinja2 \
|
||||
"
|
||||
|
||||
FILES_${PN} += "${sysconfdir} ${localstatedir}"
|
||||
CONFFILES_${PN} += "${sysconfdir}/klipper/printer.cfg"
|
||||
|
||||
INITSCRIPT_NAME = "klipper"
|
||||
INITSCRIPT_PARAMS = "start 80 2 3 4 5 . stop 90 2 3 4 5 ."
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM_${PN} = "klipper"
|
||||
USERADD_PARAM_${PN} = "--system -d ${localstatedir}/lib/klipper/ -g klipper klipper"
|
||||
|
||||
do_compile() {
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -o ${B}/hub-ctrl ${S}/lib/hub-ctrl/hub-ctrl.c `pkg-config --cflags --libs libusb`
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget_${PN}_append () {
|
||||
chown -R klipper.klipper $D${sysconfdir}/klipper
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -m 0755 -d ${D}${sysconfdir}/klipper
|
||||
install -m 0755 -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/klipper.default ${D}${sysconfdir}/default/klipper
|
||||
install -m 0755 -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/klipper.init ${D}${sysconfdir}/init.d/klipper
|
||||
|
||||
install -m 0755 -d ${D}${bindir}
|
||||
install -m 0755 ${B}/hub-ctrl ${D}${bindir}/hub-ctrl
|
||||
|
||||
install -d ${D}${localstatedir}/lib/klipper/sdcard
|
||||
install -d ${D}${localstatedir}/lib/klipper/config
|
||||
install -m 0644 ${S}/config/*.cfg ${D}${localstatedir}/lib/klipper/config
|
||||
chmod -R g+rw ${D}${localstatedir}/lib/klipper
|
||||
}
|
||||
15
yocto/meta-klipper/recipes-python/argh/python-argh_0.26.2.bb
Normal file
15
yocto/meta-klipper/recipes-python/argh/python-argh_0.26.2.bb
Normal file
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "Pattern matching and various utilities for file systems paths."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/argh/"
|
||||
|
||||
LICENSE = "LGPLv2"
|
||||
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=cede70b648dcc81baf5b431d38905bad"
|
||||
|
||||
PYPI_PACKAGE = "argh"
|
||||
|
||||
SRC_URI[sha256sum] = "e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,21 @@
|
||||
SUMMARY = "Python flexible slugify function https://pypi.python.org/pypi/awesome-slugify"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://github.com/dimka665/awesome-slugify"
|
||||
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://setup.py;beginline=22;endline=24;md5=ae3de4b453d37fcbff2ca5a8a4725cfd"
|
||||
|
||||
PYPI_PACKAGE = "awesome-slugify"
|
||||
#PYPI_SRC_URI = "https://files.pythonhosted.org/packages/34/39/79ef4e640c3651b40de7812f5fcd04698abf14de4f57a81e12b6c753d168/awesome-slugify-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "bbdec3fa2187917473a2efad092b57f7125a55f841a7cf6a1773178d32ccfd71"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
RDEPENDS_${PN} = "python-nose \
|
||||
python-regex \
|
||||
python-unidecode \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,11 @@
|
||||
SUMMARY = "A collection of cache libraries in the same API interface. Extracted from werkzeug."
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a32a7594742a04098377c0c777ec1af7"
|
||||
|
||||
SRC_URI[sha256sum] = "8b889b509d372095357b8705966e1282d40835c4126d7c2b07fd414514d8ae8d"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "cachelib"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "Python package for providing Mozilla's CA Bundle."
|
||||
DESCRIPTION = "This installable Python package contains a CA Bundle that you can reference in your \
|
||||
Python code. This is useful for verifying HTTP requests, for example. This is the same CA Bundle \
|
||||
which ships with the Requests codebase, and is derived from Mozilla Firefox's canonical set."
|
||||
HOMEPAGE = " http://certifi.io/"
|
||||
|
||||
LICENSE = "ISC"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=f77f61d14ee6feac4228d3ebd26cc1f1"
|
||||
|
||||
PYPI_PACKAGE = "certifi"
|
||||
|
||||
SRC_URI[sha256sum] = "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Backport/clone of ChainMap for py26, py32, and pypy3."
|
||||
DESCRIPTION = "\
|
||||
This module is a polyfill, implementing ChainMap for reasonably-recent versions of Python that do not have collections.ChainMap–namely, Python 2.6, Python 3.2, and PyPy3 releases based on Python 3.2. (It will also work as expected on Python 2.7, PyPy, and Python 3.3 and higher, but it is not needed there since those verions’ collections modules contains a ChainMap implementation.)"
|
||||
LICENSE = "PSF"
|
||||
LIC_FILES_CHKSUM = "file://setup.py;beginline=23;endline=23;md5=fa869eb628865ee985e6a9d306744ac8"
|
||||
|
||||
SRC_URI[sha256sum] = "e42aaa4b3e2f66102a11bfd563069704bfbfd84fdcb517b564effd736bf53cd9"
|
||||
|
||||
PYPI_PACKAGE = "chainmap"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
SUMMARY = "Emoji for Python"
|
||||
HOMEPAGE = "https://github.com/carpedm20/emoji/"
|
||||
LICENSE = "BSD"
|
||||
SECTION = "devel/python"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9d99980d85e5f81e38ee21f7f4f730d4"
|
||||
|
||||
PYPI_PACKAGE = "emoji"
|
||||
|
||||
SRC_URI[sha256sum] = "60652d3a2dcee5b8af8acb097c31776fb6d808027aeb7221830f72cdafefc174"
|
||||
|
||||
inherit setuptools pypi
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
SUMMARY = "Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=cc0e8af5f14a75ce53b7b9db0f4bd91e"
|
||||
|
||||
SRC_URI[sha256sum] = "da393ece8d98b47edf2dd5a85a2c8733e44b769e32c71af4cd96ed8d38d96aa7"
|
||||
|
||||
PYPI_PACKAGE = "filetype"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "Flask webassets integration."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "http://flask-assets.readthedocs.org/en/latest/"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2c0c455026ee819a9365678bea8b2c82"
|
||||
|
||||
DEPENDS = "python-webassets"
|
||||
|
||||
PYPI_PACKAGE = "Flask-Assets"
|
||||
#PYPI_SRC_URI = "https://files.pythonhosted.org/packages/86/ff/6000451570745d7a90847f6528d96d6b24c800eaaf9f26cf398accd8cee5/Flask-Assets-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "6031527b89fb3509d1581d932affa5a79dd348cfffb58d0aef99a43461d47847"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
RDEPENDS_${PN} = "python-webassets"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,22 @@
|
||||
SUMMARY = "A microframework based on Werkzeug, Jinja2 and good intentions"
|
||||
DESCRIPTION = "\
|
||||
Flask is a microframework for Python based on Werkzeug, Jinja 2 and good \
|
||||
intentions. And before you ask: It’s BSD licensed!"
|
||||
HOMEPAGE = "https://github.com/mitsuhiko/flask/"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=19866b76b054ab30c270c0eb9d7e43d7"
|
||||
|
||||
SRC_URI[sha256sum] = "fac2b9d443e49f7e7358a444a3db5950bdd0324674d92ba67f8f1f15f876b14f"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
PYPI_PACKAGE = "Flask"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
${PYTHON_PN}-click \
|
||||
${PYTHON_PN}-itsdangerous \
|
||||
${PYTHON_PN}-jinja2 \
|
||||
${PYTHON_PN}-werkzeug \
|
||||
"
|
||||
@@ -0,0 +1,11 @@
|
||||
SUMMARY = "python-frozendict recipe"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://${S}/LICENSE.txt;md5=f4da037a49c09b456fdbbc7a5bd36132"
|
||||
|
||||
PYPI_PACKAGE = "frozendict"
|
||||
|
||||
SRC_URI[sha256sum] = "774179f22db2ef8a106e9c38d4d1f8503864603db08de2e33be5b778230f6e45"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
SUMMARY = "Python Jinja2: A small but fast and easy to use stand-alone template engine written in pure python."
|
||||
DESCRIPTION = "Python Jinja2: A small but fast and easy to use stand-alone template engine written in pure python."
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=20c831f91dd3bd486020f672ba2be386"
|
||||
|
||||
SRC_URI[sha256sum] = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891"
|
||||
|
||||
PYPI_PACKAGE = "Jinja2"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
RDEPENDS_${PN} += "\
|
||||
${PYTHON_PN}-crypt \
|
||||
${PYTHON_PN}-io \
|
||||
${PYTHON_PN}-json \
|
||||
${PYTHON_PN}-lang \
|
||||
${PYTHON_PN}-markupsafe \
|
||||
${PYTHON_PN}-math \
|
||||
${PYTHON_PN}-netclient \
|
||||
${PYTHON_PN}-pickle \
|
||||
${PYTHON_PN}-pprint \
|
||||
${PYTHON_PN}-re \
|
||||
${PYTHON_PN}-shell \
|
||||
${PYTHON_PN}-textutils \
|
||||
${PYTHON_PN}-threading \
|
||||
${PYTHON_PN}-numbers \
|
||||
"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,13 @@
|
||||
SUMMARY = "A Python implementation of John Gruber's Markdown."
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=745aaad0c69c60039e638bff9ffc59ed"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "Markdown"
|
||||
#PYPI_SRC_URI = "https://files.pythonhosted.org/packages/ac/df/0ae25a9fd5bb528fe3c65af7143708160aa3b47970d5272003a1ad5c03c6/Markdown-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "d84732ecc65b3a1bff693d9d4c24277f"
|
||||
SRC_URI[sha256sum] = "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "Pattern matching and various utilities for file systems paths."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/pathtools/"
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a870e4c037fc40b3973dd56a1526fc5b"
|
||||
|
||||
PYPI_PACKAGE = "pathtools"
|
||||
|
||||
SRC_URI[sha256sum] = "7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,13 @@
|
||||
SUMMARY = "Pattern matching and various utilities for file systems paths."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/pkginfo/"
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
|
||||
|
||||
SRC_URI[sha256sum] = "7424f2c8511c186cd5424bbf31045b77435b37a8d604990b79d4e70d741148bb"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "pkginfo"
|
||||
@@ -0,0 +1,13 @@
|
||||
SUMMARY = "A least recently used (LRU) cache implementation"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/pylru/"
|
||||
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
SRC_URI[sha256sum] = "492f934bb98dc6c8b2370c02c95c65516ddc08c8f64d27f70087eb038621d297"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "pylru"
|
||||
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Alternative regular expression module, to replace re."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/regex"
|
||||
|
||||
LICENSE = "PSFL"
|
||||
LIC_FILES_CHKSUM = "file://setup.py;beginline=32;endline=31;md5=d41d8cd98f00b204e9800998ecf8427e"
|
||||
|
||||
PIPY_PACKAGE = "regex"
|
||||
#PYPI_SRC_URI = "https://pypi.python.org/packages/source/r/regex/regex-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "ce450ffbfec93821ab1fea94779a8440e10cf63819be6e176eb1973a6017aff5"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
13
yocto/meta-klipper/recipes-python/rsa/python-rsa_4.0.bb
Normal file
13
yocto/meta-klipper/recipes-python/rsa/python-rsa_4.0.bb
Normal file
@@ -0,0 +1,13 @@
|
||||
SUMMARY = "Pure-Python RSA implementation"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/rsa/"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c403f6882d4f97a9cd927df987d55634"
|
||||
|
||||
SRC_URI[sha256sum] = "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "rsa"
|
||||
@@ -0,0 +1,13 @@
|
||||
SUMMARY = "A wrapper for subprocess which provides command pipeline functionality."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/sarge"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a5b7bcb59dada77822aa4d479a96cc6d"
|
||||
|
||||
SRC_URI[sha256sum] = "da8cc90883f8e5ab4af0d746438f608662f5f2a35da2e858517927edefa134b0"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "sarge"
|
||||
@@ -0,0 +1,9 @@
|
||||
SUMMARY = "This small python library provides a few tools to handle SemVer in Python. It follows strictly the 2.0.0 version of the SemVer scheme."
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=4fb31e3c1c7eeb8b5e8c07657cdd54e2"
|
||||
|
||||
SRC_URI[sha256sum] = "d2cb2de0558762934679b9a104e82eca7af448c9f4974d1f3eeccff651df8a54"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "semantic_version"
|
||||
@@ -0,0 +1,11 @@
|
||||
SUMMARY = "Sentry-Python is an SDK for Sentry."
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=0c79f8d3c91fc847350efd28bfe0a341"
|
||||
|
||||
SRC_URI[sha256sum] = "ff1fa7fb85703ae9414c8b427ee73f8363232767c9cd19158f08f6e4f0b58fc7"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "sentry-sdk"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Sphinx"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.org/project/Sphinx/1.8.5/"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=cc3ed00294f08c93200bc064c73c9d40"
|
||||
|
||||
PYPI_PACKAGE = "Sphinx"
|
||||
#PYPI_SRC_URI = "https://files.pythonhosted.org/packages/2a/86/8e1e8400bb6eca5ed960917952600fce90599e1cb0d20ddedd81ba163370/Sphinx-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "c7658aab75c920288a8cf6f09f244c6cfdae30d82d803ac1634d9f223a80ca08"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Sphinx domain for HTTP APIs."
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/sphinxcontrib-httpdomain"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=667c3e266c41ac5129a4478ad682b1c3"
|
||||
|
||||
PYPI_PACKAGE = "sphinxcontrib-httpdomain"
|
||||
#PYPI_SRC_URI = "https://pypi.python.org/packages/source/s/sphinxcontrib-httpdomain/sphinxcontrib-httpdomain-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "ac40b4fba58c76b073b03931c7b8ead611066a6aebccafb34dc19694f4eb6335"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,38 @@
|
||||
DESCRIPTION = "Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed."
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
PYPI_PACKGE = "tornado"
|
||||
#PYPI_SRC_URI = "https://files.pythonhosted.org/packages/e3/7b/e29ab3d51c8df66922fea216e2bddfcb6430fb29620e5165b16a216e0d3c/tornado-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
RDEPENDS_${PN} += "\
|
||||
${PYTHON_PN}-compression \
|
||||
${PYTHON_PN}-numbers \
|
||||
${PYTHON_PN}-email \
|
||||
${PYTHON_PN}-pkgutil \
|
||||
${PYTHON_PN}-html \
|
||||
${PYTHON_PN}-json \
|
||||
${PYTHON_PN}-certifi \
|
||||
${PYTHON_PN}-threading \
|
||||
${PYTHON_PN}-ctypes \
|
||||
${PYTHON_PN}-backports-abc \
|
||||
${PYTHON_PN}-backports-ssl \
|
||||
${PYTHON_PN}-singledispatch \
|
||||
${PYTHON_PN}-subprocess \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-test += "${PN} ${PYTHON_PN}-unittest"
|
||||
|
||||
PACKAGES =+ "\
|
||||
${PN}-test \
|
||||
"
|
||||
|
||||
FILES_${PN}-test = " \
|
||||
${libdir}/${PYTHON_DIR}/site-packages/*/test \
|
||||
${libdir}/${PYTHON_DIR}/site-packages/*/testing.py* \
|
||||
"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "ASCII transliterations of Unicode text"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/Unidecode"
|
||||
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
PYPI_PACKAGE = "Unidecode"
|
||||
|
||||
SRC_URI[sha256sum] = "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "Filesystem events monitoring"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "http://http://werkzeug.pocoo.org/"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
SRC_URI[sha256sum] = "965f658d0732de3188211932aeb0bb457587f04f63ab4c1e33eab878e9de961d"
|
||||
|
||||
DEPENDS = "python-argh"
|
||||
|
||||
RDEPENDS_${PN} = "python-pathtools python-argh"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "watchdog"
|
||||
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "Media asset management for Python, with glue code for various web frameworks"
|
||||
SECTION = "devel/python"
|
||||
|
||||
HOMEPAGE = "https://pypi.python.org/pypi/webassets/"
|
||||
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=01c7e9175fd063ebb0a6304af80e9874"
|
||||
|
||||
PYPI_PACKGE = "webassets"
|
||||
|
||||
SRC_URI[sha256sum] = "167132337677c8cedc9705090f6d48da3fb262c8e0b2773b29f3352f050181cd"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -0,0 +1,12 @@
|
||||
SUMMARY = "WebSocket client for python. hybi13 is supported."
|
||||
HOMEPAGE = "https://github.com/websocket-client/websocket-client.git"
|
||||
LICENSE = "LGPL-3.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c4c4a98fbc4836b81c8c64d6ecb01fc1"
|
||||
|
||||
SRC_URI[sha256sum] = "1fd5520878b68b84b5748bb30e592b10d0a91529d5383f74f4964e72b297fd3a"
|
||||
|
||||
inherit pypi setuptools
|
||||
|
||||
PYPI_PACKAGE = "websocket_client"
|
||||
|
||||
RDEPENDS_${PN} += "python-backports-ssl"
|
||||
29
yocto/meta-klipper/recipes-webui/octoprint/files/config.yaml
Normal file
29
yocto/meta-klipper/recipes-webui/octoprint/files/config.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
serial:
|
||||
autoconnect: true
|
||||
baudrate: 115200
|
||||
port: /tmp/printer
|
||||
timeout: {}
|
||||
plugins:
|
||||
pluginmanager:
|
||||
pip: /usr/bin/pip-sudo
|
||||
pip_force_user: true
|
||||
softwareupdate:
|
||||
pip_command: /usr/bin/pip-sudo
|
||||
_config_version: 6
|
||||
checks:
|
||||
octoprint:
|
||||
checkout_folder: null
|
||||
prerelease: false
|
||||
prerelease_channel: null
|
||||
notify_users: false
|
||||
server:
|
||||
onlineCheck:
|
||||
enabled: false
|
||||
pluginBlacklist:
|
||||
enabled: true
|
||||
commands:
|
||||
serverRestartCommand: /etc/init.d/octoprint restart
|
||||
systemRestartCommand: shutdown -r now
|
||||
systemShutdownCommand: shutdown -h now
|
||||
system:
|
||||
actions: []
|
||||
@@ -0,0 +1,23 @@
|
||||
# Configuration for /etc/init.d/octoprint
|
||||
|
||||
# base directory to use
|
||||
BASEDIR=/var/lib/octoprint
|
||||
|
||||
# configuration file to use
|
||||
CONFIGFILE=/etc/octoprint/config.yaml
|
||||
|
||||
# On what port to run daemon, default is 5000
|
||||
PORT=5000
|
||||
|
||||
# What arguments to pass to octoprint, usually no need to touch this
|
||||
DAEMON_ARGS="--port=$PORT"
|
||||
|
||||
# Umask of files octoprint generates, Change this to 000 if running octoprint as its own, separate user
|
||||
UMASK=022
|
||||
|
||||
# Process priority, 0 here will result in a priority 20 process.
|
||||
# -2 ensures Octoprint has a slight priority over user processes.
|
||||
NICELEVEL=-2
|
||||
|
||||
# Should we run at startup?
|
||||
START=yes
|
||||
157
yocto/meta-klipper/recipes-webui/octoprint/files/octoprint.init
Normal file
157
yocto/meta-klipper/recipes-webui/octoprint/files/octoprint.init
Normal file
@@ -0,0 +1,157 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: octoprint
|
||||
# Required-Start: $local_fs networking
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OctoPrint daemon
|
||||
# Description: Starts the OctoPrint daemon with the user specified in
|
||||
# /etc/default/octoprint.
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Sami Olmari & Gina Häußge
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="OctoPrint Daemon"
|
||||
NAME="OctoPrint"
|
||||
PKGNAME=octoprint
|
||||
PIDFILE=/var/run/$PKGNAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$PKGNAME
|
||||
DEFAULTS=/etc/default/$PKGNAME
|
||||
DAEMON=/usr/bin/octoprint
|
||||
LOGDIR=/var/log/octoprint
|
||||
|
||||
mkdir -p $LOGDDIR
|
||||
chown -R octoprint.octoprint $LOGDIR
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r $DEFAULTS ] && . $DEFAULTS
|
||||
|
||||
# Exit if the DAEMON is not set
|
||||
if [ -z "$DAEMON" ]
|
||||
then
|
||||
echo "Not starting $PKGNAME, DAEMON not set in /etc/default/$PKGNAME."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Exit if the DAEMON is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
if [ -z "$START" -o "$START" != "yes" ]
|
||||
then
|
||||
echo "Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
COMMAND_ARGS=
|
||||
if [ -n "$BASEDIR" ]
|
||||
then
|
||||
COMMAND_ARGS="--basedir $BASEDIR $COMMAND_ARGS"
|
||||
fi
|
||||
|
||||
if [ -n "$CONFIGFILE" ]
|
||||
then
|
||||
COMMAND_ARGS="--config $CONFIGFILE $COMMAND_ARGS"
|
||||
fi
|
||||
|
||||
COMMAND_ARGS="--logging $LOGDIR $COMMAND_ARGS"
|
||||
|
||||
#
|
||||
# Function to verify if a pid is alive
|
||||
#
|
||||
is_alive()
|
||||
{
|
||||
pid=`cat $1` > /dev/null 2>&1
|
||||
kill -0 $pid > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
|
||||
is_alive $PIDFILE
|
||||
RETVAL="$?"
|
||||
|
||||
if [ $RETVAL != 0 ]; then
|
||||
start-stop-daemon --start --background --quiet --pidfile $PIDFILE \
|
||||
--make-pidfile --chuid octoprint \
|
||||
--exec $DAEMON --nicelevel=$NICELEVEL \
|
||||
-- serve $COMMAND_ARGS $DAEMON_ARGS
|
||||
RETVAL="$?"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = "2" ] && return 2
|
||||
|
||||
rm -f $PIDFILE
|
||||
|
||||
[ "$RETVAL" = "0" ] && return 0 || return 1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && echo -n "Starting $DESC $NAME "
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && echo 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && echo 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && echo -n "Stopping $DESC $NAME "
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && echo 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && echo 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) echo 0 ;;
|
||||
1) echo 1 ;; # Old process is still running
|
||||
*) echo 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
echo 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,4 @@
|
||||
octoprint ALL=NOPASSWD: /etc/init.d/octoprint
|
||||
octoprint ALL=NOPASSWD: /sbin/shutdown
|
||||
octoprint ALL=NOPASSWD: /usr/bin/pip
|
||||
octoprint ALL=NOPASSWD: /usr/bin/python
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
sudo pip $*
|
||||
exit $?
|
||||
118
yocto/meta-klipper/recipes-webui/octoprint/octoprint_1.4.0.bb
Normal file
118
yocto/meta-klipper/recipes-webui/octoprint/octoprint_1.4.0.bb
Normal file
@@ -0,0 +1,118 @@
|
||||
# original recipe imported from
|
||||
# https://git.yoctoproject.org/cgit/cgit.cgi/meta-maker/tree/recipes-webui/octoprint/octoprint_git.bb
|
||||
|
||||
SUMMARY = "OctoPrint provides a responsive web interface for controlling a 3D printer."
|
||||
HOMEPAGE = "http://octoprint.org"
|
||||
|
||||
SECTION = "devel/python"
|
||||
|
||||
LICENSE = "AGPL-3.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=73f1eb20517c55bf9493b7dd6e480788"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/OctoPrint/OctoPrint.git;protocol=https;tag=${PV} \
|
||||
file://config.yaml \
|
||||
file://octoprint.default \
|
||||
file://octoprint.init \
|
||||
file://octoprint.sudo \
|
||||
file://pip-sudo \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit setuptools update-rc.d useradd
|
||||
|
||||
|
||||
export BUILD_SYS
|
||||
export HOST_SYS
|
||||
export STAGING_INCDIR
|
||||
export STAGING_LIBDIR
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
INITSCRIPT_NAME = "octoprint"
|
||||
INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 80 2 3 4 5 ."
|
||||
|
||||
do_install_append(){
|
||||
install -d ${D}${sysconfdir}/octoprint
|
||||
install -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/octoprint.default ${D}${sysconfdir}/default/octoprint
|
||||
install -m 0644 ${WORKDIR}/config.yaml ${D}${sysconfdir}/octoprint/config.yaml
|
||||
chmod a+rw ${D}${sysconfdir}/octoprint/
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/octoprint.init ${D}${sysconfdir}/init.d/octoprint
|
||||
|
||||
install -d ${D}${localstatedir}/lib/octoprint
|
||||
chmod a+rw ${D}${localstatedir}/lib/octoprint
|
||||
|
||||
install -d ${D}${sysconfdir}/sudoers.d
|
||||
install -m 0644 ${WORKDIR}/octoprint.sudo ${D}${sysconfdir}/sudoers.d/octoprint
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/pip-sudo ${D}${bindir}
|
||||
}
|
||||
|
||||
|
||||
FILES_${PN} += "${sysconfdir} ${localstatedir}"
|
||||
CONFFILES_${PN} += "${sysconfdir}/octoprint/config.yaml"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PARAM_${PN} = "octoprint"
|
||||
USERADD_PARAM_${PN} = "--system -d ${localstatedir}/lib/octoprint/ -g octoprint octoprint"
|
||||
|
||||
pkg_postinst_ontarget_${PN}_append () {
|
||||
chown -R octoprint.octoprint $D${sysconfdir}/octoprint
|
||||
chown -R octoprint.octoprint $D${localstatedir}/lib/octoprint
|
||||
}
|
||||
|
||||
DEPENDS = "${PYTHON_PN} ${PYTHON_PN}-markdown-native"
|
||||
|
||||
INSANE_SKIP_${PN} += "build-deps"
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
${PYTHON_PN}-markdown \
|
||||
${PYTHON_PN}-flask \
|
||||
${PYTHON_PN}-jinja2 \
|
||||
${PYTHON_PN}-tornado \
|
||||
${PYTHON_PN}-regex \
|
||||
${PYTHON_PN}-flask-login \
|
||||
${PYTHON_PN}-flask-babel \
|
||||
${PYTHON_PN}-flask-assets \
|
||||
${PYTHON_PN}-blinker \
|
||||
${PYTHON_PN}-werkzeug \
|
||||
${PYTHON_PN}-werkzeug-tests \
|
||||
${PYTHON_PN}-cachelib \
|
||||
${PYTHON_PN}-pyyaml \
|
||||
${PYTHON_PN}-markdown \
|
||||
${PYTHON_PN}-pyserial \
|
||||
${PYTHON_PN}-netaddr \
|
||||
${PYTHON_PN}-watchdog \
|
||||
${PYTHON_PN}-sarge \
|
||||
${PYTHON_PN}-netifaces \
|
||||
${PYTHON_PN}-pylru \
|
||||
${PYTHON_PN}-rsa \
|
||||
${PYTHON_PN}-pkginfo \
|
||||
${PYTHON_PN}-requests \
|
||||
${PYTHON_PN}-semantic-version \
|
||||
${PYTHON_PN}-psutil \
|
||||
${PYTHON_PN}-click \
|
||||
${PYTHON_PN}-awesome-slugify \
|
||||
${PYTHON_PN}-feedparser \
|
||||
${PYTHON_PN}-future \
|
||||
${PYTHON_PN}-websocket-client \
|
||||
${PYTHON_PN}-wrapt \
|
||||
${PYTHON_PN}-emoji \
|
||||
${PYTHON_PN}-frozendict \
|
||||
${PYTHON_PN}-sentry-sdk \
|
||||
${PYTHON_PN}-filetype \
|
||||
${PYTHON_PN}-futures \
|
||||
${PYTHON_PN}-monotonic \
|
||||
${PYTHON_PN}-scandir \
|
||||
${PYTHON_PN}-chainmap \
|
||||
${PYTHON_PN}-typing \
|
||||
${PYTHON_PN}-pip \
|
||||
sudo \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
25
yocto/meta-klipper/wic/tinker-board-s.wks.in
Normal file
25
yocto/meta-klipper/wic/tinker-board-s.wks.in
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2020 Garmin Ltd. or its subsidiaries
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
#
|
||||
# Disk layout
|
||||
# Note that the reference documentation refers to 512 byte disk sectors, but
|
||||
# wic uses 1KB blocks
|
||||
#
|
||||
# Partition Start Sector Number of Sectors
|
||||
# loader1 64 8000
|
||||
# reserved1 8064 128
|
||||
# reserved2 8192 8192
|
||||
# loader2 16384 8192
|
||||
# atf 24576 8192
|
||||
# root 32768 -
|
||||
|
||||
part loader1 --align 32 --size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img"
|
||||
part reserved1 --align 4032 --size 64K --ondisk ${RK_BOOT_DEVICE}
|
||||
part reserved2 --align 4096 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part loader2 --align 8192 --size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.bin"
|
||||
part atf --align 12288 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part / --align 16384 --active --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=klipper-linux-rootfs-${MACHINE}.ext4" --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p6 rootfstype=ext4 init=/sbin/init"
|
||||
|
||||
|
||||
1
yocto/meta-openembedded
Submodule
1
yocto/meta-openembedded
Submodule
Submodule yocto/meta-openembedded added at e413c1ef62
1
yocto/meta-python2
Submodule
1
yocto/meta-python2
Submodule
Submodule yocto/meta-python2 added at e2ef0dd8fa
1
yocto/meta-rockchip
Submodule
1
yocto/meta-rockchip
Submodule
Submodule yocto/meta-rockchip added at 52e6a8c2c0
1
yocto/openembedded-core
Submodule
1
yocto/openembedded-core
Submodule
Submodule yocto/openembedded-core added at 5bfdb6bfbd
1
yocto/poky
Submodule
1
yocto/poky
Submodule
Submodule yocto/poky added at ed3bdd7fbc
Reference in New Issue
Block a user