Skip to content

Commit

Permalink
Update astrometry.net to 0.67+ (partial futurized version)
Browse files Browse the repository at this point in the history
Has updates to the build system so that it can build on systems with python3,
but does not have any py3 updates to the python code itself.

Removed previous patch files since they fail to apply.

So we can better reconstruction the version of astrometry.net that was used here
(since it isn't an official release), the tarball is now named with the git hash
of the upstream master. I also pulled out the Makefile patches in my Pull Request
into a patchfile against that version.
  • Loading branch information
parejkoj committed Sep 14, 2016
1 parent ae735ff commit 6f05a58
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 58 deletions.
12 changes: 0 additions & 12 deletions patches/000-MakefileRemoveRename.patch

This file was deleted.

58 changes: 58 additions & 0 deletions patches/0001-Make-python-sed-like-line-py2-3-compatible.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 5a7f73b3f93e9bf398b9e2c59b02f14120827c58 Mon Sep 17 00:00:00 2001
From: "John K. Parejko" <parejkoj@uw.edu>
Date: Wed, 14 Sep 2016 14:01:43 -0700
Subject: [PATCH] Make python sed-like line py2/3 compatible

---
blind/Makefile | 2 +-
libkd/Makefile | 4 ++--
util/makefile.common | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/blind/Makefile b/blind/Makefile
index f233a49..abe3661 100644
--- a/blind/Makefile
+++ b/blind/Makefile
@@ -225,7 +225,7 @@ install: $(INSTALL_EXECS) $(INSTALL_LIB)
cp $$x '$(INSTALL_DIR)/bin'; \
done
mkdir -p '$(ETC_INSTALL_DIR)'
- $(PYTHON) -c "import os; print open('../etc/astrometry.cfg-dist').read().replace('DATA_INSTALL_DIR', '$(DATA_FINAL_DIR)')" > '$(ETC_INSTALL_DIR)/astrometry.cfg'
+ $(PYTHON) -c "import os; print(open('../etc/astrometry.cfg-dist').read().replace('DATA_INSTALL_DIR', '$(DATA_FINAL_DIR)'))" > '$(ETC_INSTALL_DIR)/astrometry.cfg'
mkdir -p '$(INCLUDE_INSTALL_DIR)'
@for x in $(INSTALL_H); do \
echo cp '$(INCLUDE_DIR)/'$$x '$(INCLUDE_INSTALL_DIR)'; \
diff --git a/libkd/Makefile b/libkd/Makefile
index 32a7334..f535986 100644
--- a/libkd/Makefile
+++ b/libkd/Makefile
@@ -99,11 +99,11 @@ spherematch_c$(PYTHON_SO_EXT): pyspherematch.c setup.py $(SLIB)
# pyspherematch.c includes Python.h -- so have to make sure to add Python.h include path
# (otherwise, get an obscure message from numpy about needing a python built with unicode)
ifeq ($(MAKECMDGOALS),spherematch_c$(PYTHON_SO_EXT))
- CFLAGS += $(shell $(PYTHON) -c "from __future__ import print_function; from distutils.sysconfig import *; print('-I'+get_python_inc())")
+ CFLAGS += $(shell $(PYTHON) -c "from distutils.sysconfig import *; print('-I'+get_python_inc())")
DEP_OBJ += $(PYSPHEREMATCH_OBJ)
endif
ifeq ($(MAKECMDGOALS),pyspherematch)
- CFLAGS += $(shell $(PYTHON) -c "from __future__ import print_function; from distutils.sysconfig import *; print('-I'+get_python_inc())")
+ CFLAGS += $(shell $(PYTHON) -c "from distutils.sysconfig import *; print('-I'+get_python_inc())")
DEP_OBJ += $(PYSPHEREMATCH_OBJ)
endif

diff --git a/util/makefile.common b/util/makefile.common
index 884ee8e..6bbfef2 100644
--- a/util/makefile.common
+++ b/util/makefile.common
@@ -110,7 +110,7 @@ ifneq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
endif

# Get the library suffix used by python distutils (.dll on cygwin, .so elsewhere)
-PYTHON_SO_EXT ?= $(shell $(PYTHON) -c "from __future__ import print_function; from distutils import sysconfig; print(sysconfig.get_config_var('SO'))")
+PYTHON_SO_EXT ?= $(shell $(PYTHON) -c "from distutils import sysconfig; print(sysconfig.get_config_var('SO'))")
# Set a default, otherwise terrible things happen:
# in util/Makefile : clean: rm -f *$(PYTHON_SO_EXT)
ifeq ($(PYTHON_SO_EXT)x,x)
--
2.4.5

46 changes: 0 additions & 46 deletions patches/001-IncorrectTestForIsNaN.patch

This file was deleted.

Binary file not shown.

0 comments on commit 6f05a58

Please sign in to comment.