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 / patch1.diff
Last active December 11, 2015 07:18
Patches for tigger Homebrew formula
diff --git a/Models/PlotStyles.py b/Models/PlotStyles.py
index 19cdf96..2cda4a7 100644
--- a/Models/PlotStyles.py
+++ b/Models/PlotStyles.py
@@ -45,7 +45,11 @@ StyleAttributeTypes = dict(symbol_size=int,symbol_linewidth=int,label_size=int);
# list of known colors
ColorList = [ "black","blue","lightblue","green","lightgreen","cyan","red","orange red","purple","magenta","yellow","white" ];
DefaultColor = "black";
-QColor.setAllowX11ColorNames(True);
+# Ignore this (non-existent) attribute on non-X11 platforms like the Mac
@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> {};
@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
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
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 / 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 / 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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)
@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 "")