From 5206fbd7762371d35cd9abfa7fe6e3ef355cddf8 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 5 Apr 2019 14:41:52 +0000 Subject: python3-pyfann2: Initial commit Signed-off-by: Alistair Francis Signed-off-by: Khem Raj --- .../recipes-devtools/python/python-fann2.inc | 9 +++++++ ...n-t-hardcode-swig-and-fann2-binary-locati.patch | 28 ++++++++++++++++++++++ .../recipes-devtools/python/python3-fann2_1.1.2.bb | 4 ++++ 3 files changed, 41 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-fann2.inc create mode 100644 meta-python/recipes-devtools/python/python3-fann2/0001-setup.py-Don-t-hardcode-swig-and-fann2-binary-locati.patch create mode 100644 meta-python/recipes-devtools/python/python3-fann2_1.1.2.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python-fann2.inc b/meta-python/recipes-devtools/python/python-fann2.inc new file mode 100644 index 0000000000..c415b35a92 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-fann2.inc @@ -0,0 +1,9 @@ +SUMMARY = "Python bindings for Fast Artificial Neural Networks 2.2.0 (FANN >= 2.2.0)" +SECTION = "devel/python" +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c73b943dc75f6f65e007c56ac6515c8f" + +SRC_URI[md5sum] = "0b85b418018746d63ed66b55465697a9" +SRC_URI[sha256sum] = "cdca0a65ad48e08320672affe38c3dd4ea15e27821e5e1db9fa2b34299bdd41e" + +DEPENDS += "swig-native libfann" diff --git a/meta-python/recipes-devtools/python/python3-fann2/0001-setup.py-Don-t-hardcode-swig-and-fann2-binary-locati.patch b/meta-python/recipes-devtools/python/python3-fann2/0001-setup.py-Don-t-hardcode-swig-and-fann2-binary-locati.patch new file mode 100644 index 0000000000..cbc838f0e2 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-fann2/0001-setup.py-Don-t-hardcode-swig-and-fann2-binary-locati.patch @@ -0,0 +1,28 @@ +From 85307f592c7cb87af162cca4b121b874108b7754 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Tue, 2 Apr 2019 11:25:15 -0700 +Subject: [PATCH] setup.py: Don't hardcode swig and fann2 binary locations + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Alistair Francis +--- + setup.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index 37af7c7..8e416f2 100755 +--- a/setup.py ++++ b/setup.py +@@ -81,11 +81,8 @@ def find_swig(): + + def build_swig(): + '''Run SWIG with specified parameters''' +- print("Looking for FANN libs...") +- find_fann() +- print("running SWIG...") + swig_bin = find_swig() +- swig_cmd = [swig_bin, '-c++', '-python', 'fann2/fann2.i'] ++ swig_cmd = ['swig', '-c++', '-python', 'fann2/fann2.i'] + subprocess.Popen(swig_cmd).wait() + + if "sdist" not in sys.argv: diff --git a/meta-python/recipes-devtools/python/python3-fann2_1.1.2.bb b/meta-python/recipes-devtools/python/python3-fann2_1.1.2.bb new file mode 100644 index 0000000000..a04c961f4a --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-fann2_1.1.2.bb @@ -0,0 +1,4 @@ +require python-fann2.inc +inherit pypi setuptools3 + +SRC_URI += " file://0001-setup.py-Don-t-hardcode-swig-and-fann2-binary-locati.patch" -- cgit 1.2.3-korg