Skip to content

Instantly share code, notes, and snippets.

View ludwigschwardt's full-sized avatar

Ludwig Schwardt ludwigschwardt

  • Cape Town, South Africa
View GitHub Profile
@ludwigschwardt
ludwigschwardt / casacore-improve-cmake-findpython-3.1.0.patch
Last active May 24, 2019 16:03
Add improved CMake FindPython routines to casacore 3.1.0
diff --git a/python/CMakeLists-cmake3.12.txt b/python/CMakeLists-cmake3.12.txt
new file mode 100644
index 000000000..7c981f734
--- /dev/null
+++ b/python/CMakeLists-cmake3.12.txt
@@ -0,0 +1,90 @@
+message(STATUS "Looking for python2 specific environment...")
+
+find_package(Python2 REQUIRED COMPONENTS Interpreter Development NumPy)
+
@ludwigschwardt
ludwigschwardt / casacore-cmake-findpython.patch
Last active May 17, 2019 12:34
Use the latest FindPython cmake modules to improve Python detection in casacore
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index f2fa84a..8624584 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,32 +1,13 @@
message(STATUS "Looking for python2 specific environment...")
-# tempororarly set variables used by findpython
-if (PYTHON2_EXECUTABLE)
- set(PYTHON_EXECUTABLE ${PYTHON2_EXECUTABLE} CACHE FILEPATH "")
@ludwigschwardt
ludwigschwardt / casacore-patch-boost-pythonxy.patch
Last active May 17, 2019 12:13
casacore/casacore#846: Boost Python library name now has pythonxy suffix
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index f8ece25..db824fd 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -22,7 +22,23 @@ set(Python_FIND_VERSION 2)
set(PythonInterp_FIND_VERSION_MAJOR 2)
find_package(Python REQUIRED)
if (PYTHONINTERP_FOUND)
- find_package(Boost REQUIRED COMPONENTS python)
+ find_package(Boost REQUIRED)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ludwigschwardt
ludwigschwardt / Stikeez Part 1.ipynb
Last active September 11, 2015 21:21
Stikeez Part 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ludwigschwardt
ludwigschwardt / version.py
Last active November 18, 2017 03:35 — forked from mina86/version.py
Produce a setuptools-compatible package version number based on git tags
# -*- coding: utf-8 -*-
"""Calculate the current package version number based on git tags.
If possible, use the output of “git describe” modified to conform to the
versioning scheme that setuptools uses (see PEP 386). Releases must be
labelled with annotated tags (signed tags are annotated) of the following
format:
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ]
@ludwigschwardt
ludwigschwardt / patch1.diff
Last active December 15, 2015 03:39
Patches for pyrap Homebrew formula
diff --git a/batchbuild.py b/batchbuild.py
index 2af88a6..2b9cbf1 100755
--- a/batchbuild.py
+++ b/batchbuild.py
@@ -5,7 +5,6 @@ import os
import glob
import shutil
import re
-import string
import optparse
@ludwigschwardt
ludwigschwardt / patch1.diff
Created February 4, 2013 10:05
Patches for purr Homebrew formula
diff --git a/Kittens/pixmaps.py b/Kittens/pixmaps.py
index f136a5b..422cf68 100644
--- a/Kittens/pixmaps.py
+++ b/Kittens/pixmaps.py
@@ -3020,7 +3020,8 @@ def load_icons (appname):
global __icons_loaded;
if __icons_loaded:
return;
- for path in sys.path:
+ icon_paths = ['/usr/local/share/meqtrees'] + sys.path
@ludwigschwardt
ludwigschwardt / patch1.diff
Created February 4, 2013 09:55
Patches for casarest Homebrew formula
diff --git a/msvis/MSVis/AsynchronousTools.cc b/msvis/MSVis/AsynchronousTools.cc
index 81ad733..c442f0d 100644
--- a/msvis/MSVis/AsynchronousTools.cc
+++ b/msvis/MSVis/AsynchronousTools.cc
@@ -508,13 +508,8 @@ Semaphore::Semaphore (int initialValue)
name_p = utilj::format ("/CasaAsync_%03d", i);
impl_p->semaphore_p = sem_open (name_p.c_str(), O_CREAT | O_EXCL, 0700, initialValue);//new sem_t;
-#ifdef __APPLE__
- code = (size_t(impl_p->semaphore_p) == SEM_FAILED) ? errno : 0;
@ludwigschwardt
ludwigschwardt / patch1.diff
Last active December 11, 2015 07:48
Patches for meqtrees Homebrew formula
diff --git a/DMI/src/DMI.h b/DMI/src/DMI.h
index 49e2e9b..8917bcf 100644
--- a/DMI/src/DMI.h
+++ b/DMI/src/DMI.h
@@ -110,6 +110,7 @@ namespace DMI
// compile-time error reporting. This is borrowed from Alexandrescu
template<int> struct CompileTimeError;
template<> struct CompileTimeError<true> {};
+ template<> struct CompileTimeError<false> {};