gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: make build system faste


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: make build system faster and saner
Date: Fri, 23 Aug 2019 16:17:53 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 359f09a  make build system faster and saner
359f09a is described below

commit 359f09a7d2eb6e138e491473ad3c949d4cf06230
Author: Florian Dold <address@hidden>
AuthorDate: Fri Aug 23 16:17:20 2019 +0200

    make build system faster and saner
---
 .gitignore                                         |  14 -
 INCLUDE.APP                                        |  25 -
 Makefile                                           |  35 ++
 Makefile.am                                        | 118 ----
 bank.wsgi.in                                       |  20 -
 bootstrap                                          |  12 -
 config.mk                                          |   2 +
 configure                                          |  87 +++
 configure.ac                                       |  96 ---
 Doxyfile => contrib/Doxyfile                       |   0
 doc/Makefile.am                                    |  27 -
 install-dev.py.in                                  |  29 -
 m4/ax_compare_version.m4                           | 177 ------
 m4/python.m4                                       | 646 ---------------------
 manage.py                                          |  19 +
 requirements.txt                                   |   4 -
 run-tests.sh                                       |   6 +
 setup.py                                           |   7 +-
 taler-bank-manage.in                               | 185 ------
 talerbank/Makefile.am                              |   9 -
 talerbank/app/Makefile.am                          |  13 -
 talerbank/app/management/Makefile.am               |   4 -
 talerbank/app/management/commands/Makefile.am      |   6 -
 talerbank/app/migrations/Makefile.am               |   5 -
 talerbank/app/static/Makefile.am                   |   6 -
 talerbank/app/templates/Makefile.am                |  11 -
 .../app/testconfigs/bank-check-alt-badamount.conf  |   0
 .../app/testconfigs/bank-check-alt-nocurrency.conf |   0
 .../app/testconfigs/bank-check.conf                |   0
 unused.conf                                        |   3 -
 30 files changed, 152 insertions(+), 1414 deletions(-)

diff --git a/.gitignore b/.gitignore
index 700166e..db56c0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,9 @@
 doxygen-doc/
-compile
-missing
-install-sh
-Makefile.in
-install-dev.py
 *.pyc
 *.pyo
 *.swp
-Makefile
 taler-bank-manage
-autom4te.cache/
-config.status
-config.log
-aclocal.m4
-configure
-bank.wsgi
-bank-admin.wsgi
 talerbank.egg-info
-talerbank/vassals-*/*.ini
 doc/mdate-sh
 doc/stamp-vti
 doc/taler-bank.info
diff --git a/INCLUDE.APP b/INCLUDE.APP
deleted file mode 100644
index 11f4a11..0000000
--- a/INCLUDE.APP
+++ /dev/null
@@ -1,25 +0,0 @@
-talerbank/app/captcha.py
-talerbank/app/config.py
-talerbank/app/errors.py
-talerbank/app/funds_mgmt.py
-talerbank/app/history.py
-talerbank/app/lib.py
-talerbank/app/management/commands/pre_accounts.py
-talerbank/app/models.py
-talerbank/app/my-static/style.css
-talerbank/app/privileged_accounts.py
-talerbank/app/schemas.py
-talerbank/app/templates/account_disabled.html
-talerbank/app/templates/central_page.html
-talerbank/app/templates/error.html
-talerbank/app/templates/history.html
-talerbank/app/templates/home_page.html
-talerbank/app/templates/logout.html
-talerbank/app/templates/pin_tan.html
-talerbank/app/templates/public_histories_reloaded.html
-talerbank/app/templates/register.html
-talerbank/app/urls.py
-talerbank/app/user_mgmt.py
-talerbank/app/util.py
-talerbank/app/views.py
-taler-bank-manage.in
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9020a0d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+install_global=false
+-include config.mk
+
+.PHONY: all
+all:
+       @echo "This is a python project, no compilation required"
+
+.PHONY: install
+
+ifeq ($(install_global), true)
+install: install-global
+else
+install: install-local
+endif
+
+.PHONY: install-global
+install-global:
+       pip3 install .
+
+.PHONY: install-local
+install-local:
+       pip3 install . --user
+
+# See bug #5850 for some test cases that are currently disabled.
+.PHONY: check
+check:
+       ./run-tests.sh
+
+.PHONY: clean
+clean:
+       @echo nothing to do
+
+.PHONY: dist
+dist:
+       git archive --format=tar.gz HEAD -o taler-bank.tar.gz
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 44f47b8..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,118 +0,0 @@
-# This script is in the public domain.
-
-SUBDIRS = . talerbank
-if ENABLE_DOC
-SUBDIRS += doc
-endif
-
-EXTRA_DIST = \
- requirements.txt \
- taler-bank-manage.in \
- bank.wsgi.in \
- setup.py \
- contrib/nginx/django_nginx.conf \
- bank.conf \
- bank-check.conf \
- bank-check-alt-badamount.conf \
- bank-check-alt-nocurrency.conf
-
-pkgcfgdir= $(prefix)/share/taler/config.d/
-
-pkgcfg_DATA = \
-  bank.conf
-
-pkgdata_DATA = \
-  bank.wsgi
-
-# link package under prefix to source tree
-.PHONY: install-dev
-install-dev:
-       @$(PYTHON) ./install-dev.py
-
-env:
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="bank-check.conf" && bash
-FMT="\n\n%s\n%s\n"
-SEPARATOR=`printf "%s%s" \
-  "----------------------------------------------" \
-  "------------------------"`
-PYTHONPATH_APPEND=`printf "%s" \
-  "@prefix@/lib/python@PYTHON_VERSION@/site-packages"`
-
-check:
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="bank-check.conf" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 -m django test --no-input talerbank.app.tests
-       @printf ${FMT} ${SEPARATOR} \
-           "Testing against non existent config file"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="non-existent.conf" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 \
-           -m django test \
-           --no-input talerbank.app.tests ; \
-           test 3 = $$?
-       @printf ${FMT} ${SEPARATOR} \
-           "Testing against bad db string"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="unused.conf" \
-         TALER_BANK_ALTDB="bad db string" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 \
-           -m django test \
-           --no-input \
-           talerbank.app.tests_alt.BadDatabaseStringTestCase ; \
-         test 2 = $$?
-       @printf ${FMT} ${SEPARATOR} \
-            "Testing against bad amount"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="bank-check-alt-badamount.conf" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 \
-           -m django test \
-           --no-input \
-           talerbank.app.tests_alt.BadMaxDebitOptionTestCase
-       @printf ${FMT} ${SEPARATOR} \
-           "Testing against db not found"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_BANK_ALTDB="postgres:///idontexist" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 ./taler-bank-manage --config=bank-check.conf serve-uwsgi ; 
\
-         test 4 = $$?
-       @printf ${FMT} ${SEPARATOR} \
-           "Testing against no currency in config"
-       @export TALER_BASE_CONFIG="/tmp" \
-         DJANGO_SETTINGS_MODULE="talerbank.settings" \
-         TALER_PREFIX="@prefix@" \
-         TALER_CONFIG_FILE="bank-check-alt-nocurrency.conf" \
-         PYTHONPATH="${PYTHONPATH_APPEND}:${PYTHONPATH}" \
-         && python3 \
-           -m django test \
-           --no-input \
-           talerbank.app.tests_alt.NoCurrencyOptionTestCase ; \
-         test 3 = $$?
-
-
-# install into prefix
-install-exec-hook:
-       @pip3 install . @DEBIAN_PIP3_SYSTEM@ \
-         --target="${PYTHONPATH_APPEND}" \
-         --install-option="--install-scripts=@prefix@/bin"
-       @# force update when sources changed
-       @pip3 install . --target="${PYTHONPATH_APPEND}" \
-         @DEBIAN_PIP3_SYSTEM@ --upgrade --no-deps \
-         --install-option="--install-scripts=@prefix@/bin"
-
-pylint:
-       @pylint --load-plugins pylint_django talerbank/
-
-app:
-       @tar czf taler-bank-$(PACKAGE_VERSION)-app.tgz \
-         `cat INCLUDE.APP`
diff --git a/bank.wsgi.in b/bank.wsgi.in
deleted file mode 100644
index c15e645..0000000
--- a/bank.wsgi.in
+++ /dev/null
@@ -1,20 +0,0 @@
-import os
-import sys
-import site
-
-if sys.version_info.major < 3:
-    print("The taler bank needs to run with Python>=3.4")
-    sys.exit(1)
-
-os.environ.setdefault("TALER_PREFIX", "@prefix@")
-site.addsitedir("%s/lib/python%d.%d/site-packages" % (
-    "@prefix@", 
-    sys.version_info.major,
-    sys.version_info.minor))
-
-import django
-django.setup()
-
-from django.core.wsgi import get_wsgi_application
-
-application = get_wsgi_application()
diff --git a/bootstrap b/bootstrap
deleted file mode 100755
index 373e5f5..0000000
--- a/bootstrap
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if ! git --version >/dev/null; then
-  echo "git not installed"
-  exit 1
-fi
-
-echo "$0: Updating submodules"
-echo | git submodule update --init
-
-echo "$0: Running autoreconf"
-autoreconf -if
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..9f73bbf
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,2 @@
+# this file is autogenerated by ./configure
+install_global=false
diff --git a/configure b/configure
new file mode 100755
index 0000000..54c6944
--- /dev/null
+++ b/configure
@@ -0,0 +1,87 @@
+#!/usr/bin/env bash
+
+set -eu
+
+usage() {
+  echo "Usage: ./configure [OPTION]"
+  echo
+  echo "Configuration:"
+  echo "  -h, --help              display this help and exit"
+  echo
+  echo "Installation directories:"
+  echo "  --prefix=[local|global] install Python package locally or globally"
+}
+
+
+# -allow a command to fail with !’s side effect on errexit
+# -use return value from ${PIPESTATUS[0]}, because ! hosed $?
+! getopt --test > /dev/null
+if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
+    echo 'getopt not available'
+    exit 1
+fi
+
+LONGOPTS=prefix:,help
+OPTIONS=h
+
+! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- 
"$@")
+if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
+    # e.g. return value is 1
+    #  then getopt has complained about wrong arguments to stdout
+    exit 2
+fi
+
+# read getopt’s output this way to handle the quoting right:
+eval set -- "$PARSED"
+
+prefix="local"
+
+while true; do
+    case "$1" in
+      --prefix)
+        prefix="$2"
+        shift 2
+        ;;
+      -h|--help)
+        usage
+        exit 1
+        ;;
+      --)
+        shift
+        break
+        ;;
+      *)
+        echo "Programming error"
+        exit 3
+        ;;
+    esac
+done
+
+case "$prefix" in
+  local)
+    install_global=false
+    ;;
+  global)
+    install_global=true
+    ;;
+  *)
+    echo "Prefix must be 'local' or 'global', paths are not allowed."
+    exit 3
+    ;;
+esac
+
+cat << EOF > config.mk
+# this file is autogenerated by ./configure
+install_global=$install_global
+EOF
+
+
+if ! python3 --version &>/dev/null; then
+  echo 'Error: python3 missing'
+  exit 1
+fi
+
+if ! pip3 --version &>/dev/null; then
+  echo 'Error: pip3 missing'
+  exit 1
+fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 644ee4a..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,96 +0,0 @@
-# This script is in the public domain.
-AC_PREREQ(2.61)
-AC_INIT([taler-bank], [0.5.1], [address@hidden])
-
-AC_CONFIG_MACRO_DIR([m4])
-
-AM_INIT_AUTOMAKE
-AC_PROG_AWK
-AC_PROG_SED
-
-
-AC_ARG_ENABLE([[doc]],
-  [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
-    [enable_doc=yes])
-test "x$enable_doc" = "xno" || enable_doc=yes
-AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
-
-
-#
-# Check for Python
-#
-
-PC_INIT([3.4])
-pyheaders=0
-PC_PYTHON_CHECK_HEADERS([pyheaders=1])
-
-# Get Python version
-PC_PYTHON_CHECK_VERSION()
-
-# Get python executable name
-m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 
python3.6 python3.7 python])
-AM_PATH_PYTHON([3.4],, [:])
-AC_SUBST([PYTHON])
-AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
-
-#
-# Check for pip3.
-# Since it is either pip3 or pip[3.4,3.5,3.6,3.7],
-# we check using python module loading.
-PIP_EXE="$PYTHON -m pip"
-PIP_VERSION=$($PIP_EXE -V | grep -v "No module named" | tr -d '\n' | $AWK '{ 
print $2 }')
-AC_MSG_RESULT([pip3 version: $PIP_VERSION])
-
-AX_COMPARE_VERSION([$PIP_VERSION],[lt],[6.0], [AC_MSG_ERROR([Please install 
pip3>=6.0])])
-
-AC_ARG_VAR(DEBIAN_PIP3_SYSTEM,
-           "Custom flags to be used along 'pip install'
-            (this is mandatory on some Debians to be set as '--system',
-            in order to get 'make install' obey the --prefix switch.)")
-#
-# Check for PostgreSQL
-#
-AC_MSG_CHECKING([Checking for Postgres])
-pg_config --version > /dev/null
-if test $? -ne 0;
-  then
-  AC_MSG_ERROR([Please install PostgreSQL])
-fi
-
-psql --version > /dev/null
-if test $? -ne 0;
-  then
-  AC_MSG_WARN([PostgreSQL present but 'psql' is not in $PATH])
-fi
-
-#
-# Check for tsc
-#
-AC_CHECK_PROG([tsc],[tsc],[yes],[no])
-AM_CONDITIONAL([HAVE_TSC], [test "x$tsc" = xyes])
-
-if test x$pyheaders != x1; then
-  AC_MSG_WARN([Python headers not installed, might be required to build uwsgi])
-fi
-
-#
-# Finish
-#
-
-AC_CONFIG_FILES([
- Makefile
- bank.wsgi
- doc/Makefile
- install-dev.py
- taler-bank-manage
- talerbank/Makefile
- talerbank/app/Makefile
- talerbank/app/management/Makefile
- talerbank/app/management/commands/Makefile
- talerbank/app/migrations/Makefile
- talerbank/app/static/Makefile
- talerbank/app/static/web-common/Makefile
- talerbank/app/templates/Makefile
-])
-
-AC_OUTPUT
diff --git a/Doxyfile b/contrib/Doxyfile
similarity index 100%
rename from Doxyfile
rename to contrib/Doxyfile
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index 2a5a5c6..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# This Makefile.am is in the public domain
-
-SUBDIRS = .
-
-man_MANS = \
-  taler-bank-manage.1 \
-  taler-bank-wsgi.1
-
-AM_MAKEINFOHTMLFLAGS = \
-  --no-split \
-  --css-ref=docstyle.css \
-  --css-ref=brown-paper.css \
-  -c EXTRA_HEAD='<meta name="viewport" content="width=device-width, 
initial-scale=1.0">'
-
-DISTCLEANFILES = \
-  taler-bank.cps \
-  taler-bank.dvi
-
-info_TEXINFOS = \
-  taler-bank.texi
-extra_TEXINFOS = \
-  fdl-1.3.texi \
-  agpl.texi \
-  syntax.texi
-EXTRA_DIST = \
-  $(man_MANS) \
-  $(extra_TEXINFOS)
diff --git a/install-dev.py.in b/install-dev.py.in
deleted file mode 100644
index 214b243..0000000
--- a/install-dev.py.in
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-"""
-This file is in the public domain.
-
-Execute pip3 in the right environment and the right parameters to install this
-package in the correct path.
-
-This is not a common use-case for pip, and thus it needs some hand-holding.
-"""
-
-import sys
-import os
-
-prefix_path = "%s/lib/python%d.%d/site-packages" % (
-    "@prefix@",
-    sys.version_info.major,
-    sys.version_info.minor)
-
-current_paths = os.environ.get("PYTHONPATH", "").split(":")
-current_paths.append(prefix_path)
-current_paths = [x for x in current_paths if x != ""]
-os.environ["PYTHONPATH"] = ":".join(current_paths)
-
-args = ["pip3", "install", '--install-option=--prefix=%s' % "@prefix@", "-e", 
"."]
-if "@DEBIAN_PIP3_SYSTEM@":
-    args.push("@DEBIAN_PIP3_SYSTEM@")
-
-os.execvp("pip3", args)
diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4
deleted file mode 100644
index 74dc0fd..0000000
--- a/m4/ax_compare_version.m4
+++ /dev/null
@@ -1,177 +0,0 @@
-# ===========================================================================
-#    http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], 
[ACTION-IF-FALSE])
-#
-# DESCRIPTION
-#
-#   This macro compares two version strings. Due to the various number of
-#   minor-version numbers that can exist, and the fact that string
-#   comparisons are not compatible with numeric comparisons, this is not
-#   necessarily trivial to do in a autoconf script. This macro makes doing
-#   these comparisons easy.
-#
-#   The six basic comparisons are available, as well as checking equality
-#   limited to a certain number of minor-version levels.
-#
-#   The operator OP determines what type of comparison to do, and can be one
-#   of:
-#
-#    eq  - equal (test A == B)
-#    ne  - not equal (test A != B)
-#    le  - less than or equal (test A <= B)
-#    ge  - greater than or equal (test A >= B)
-#    lt  - less than (test A < B)
-#    gt  - greater than (test A > B)
-#
-#   Additionally, the eq and ne operator can have a number after it to limit
-#   the test to that number of minor versions.
-#
-#    eq0 - equal up to the length of the shorter version
-#    ne0 - not equal up to the length of the shorter version
-#    eqN - equal up to N sub-version levels
-#    neN - not equal up to N sub-version levels
-#
-#   When the condition is true, shell commands ACTION-IF-TRUE are run,
-#   otherwise shell commands ACTION-IF-FALSE are run. The environment
-#   variable 'ax_compare_version' is always set to either 'true' or 'false'
-#   as well.
-#
-#   Examples:
-#
-#     AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
-#     AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
-#
-#   would both be true.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
-#     AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
-#
-#   would both be false.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
-#
-#   would be true because it is only comparing two minor versions.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
-#
-#   would be true because it is only comparing the lesser number of minor
-#   versions of the two values.
-#
-#   Note: The characters that separate the version numbers do not matter. An
-#   empty string is the same as version 0. OP is evaluated by autoconf, not
-#   configure, so must be a string, not a variable.
-#
-#   The author would like to acknowledge Guido Draheim whose advice about
-#   the m4_case and m4_ifvaln functions make this macro only include the
-#   portions necessary to perform the specific comparison specified by the
-#   OP argument in the final configure script.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Tim Toolan <address@hidden>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 11
-
-dnl #########################################################################
-AC_DEFUN([AX_COMPARE_VERSION], [
-  AC_REQUIRE([AC_PROG_AWK])
-
-  # Used to indicate true or false condition
-  ax_compare_version=false
-
-  # Convert the two version strings to be compared into a format that
-  # allows a simple string comparison.  The end result is that a version
-  # string of the form 1.12.5-r617 will be converted to the form
-  # 0001001200050617.  In other words, each number is zero padded to four
-  # digits, and non digits are removed.
-  AS_VAR_PUSHDEF([A],[ax_compare_version_A])
-  A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/[[^0-9]]//g'`
-
-  AS_VAR_PUSHDEF([B],[ax_compare_version_B])
-  B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/[[^0-9]]//g'`
-
-  dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
-  dnl # then the first line is used to determine if the condition is true.
-  dnl # The sed right after the echo is to remove any indented white space.
-  m4_case(m4_tolower($2),
-  [lt],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
-  ],
-  [gt],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
-  ],
-  [le],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
-  ],
-  [ge],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
-  ],[
-    dnl Split the operator from the subversion count if present.
-    m4_bmatch(m4_substr($2,2),
-    [0],[
-      # A count of zero means use the length of the shorter version.
-      # Determine the number of characters in A and B.
-      ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
-      ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
-
-      # Set A to no more than B's length and B to no more than A's length.
-      A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
-      B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
-    ],
-    [[0-9]+],[
-      # A count greater than zero means use only that many subversions
-      A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
-      B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
-    ],
-    [.+],[
-      AC_WARNING(
-        [illegal OP numeric parameter: $2])
-    ],[])
-
-    # Pad zeros at end of numbers to make same length.
-    ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
-    B="$B`echo $A | sed 's/./0/g'`"
-    A="$ax_compare_version_tmp_A"
-
-    # Check for equality or inequality as necessary.
-    m4_case(m4_tolower(m4_substr($2,0,2)),
-    [eq],[
-      test "x$A" = "x$B" && ax_compare_version=true
-    ],
-    [ne],[
-      test "x$A" != "x$B" && ax_compare_version=true
-    ],[
-      AC_WARNING([illegal OP parameter: $2])
-    ])
-  ])
-
-  AS_VAR_POPDEF([A])dnl
-  AS_VAR_POPDEF([B])dnl
-
-  dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
-  if test "$ax_compare_version" = "true" ; then
-    m4_ifvaln([$4],[$4],[:])dnl
-    m4_ifvaln([$5],[else $5])dnl
-  fi
-]) dnl AX_COMPARE_VERSION
diff --git a/m4/python.m4 b/m4/python.m4
deleted file mode 100644
index 98a68b8..0000000
--- a/m4/python.m4
+++ /dev/null
@@ -1,646 +0,0 @@
-# Copyright 2012, 2013, 2014 Brandon Invergo <address@hidden>
-#
-# This file is part of pyconfigure.  This program is free
-# software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# Under Section 7 of GPL version 3, you are granted additional
-# permissions described in the Autoconf Configure Script Exception,
-# version 3.0, as published by the Free Software Foundation.
-#
-# You should have received a copy of the GNU General Public License
-# and a copy of the Autoconf Configure Script Exception along with
-# this program; see the files COPYINGv3 and COPYING.EXCEPTION
-# respectively.  If not, see <http://www.gnu.org/licenses/>.
-
-
-# Many of these macros were adapted from ones written by Andrew Dalke
-# and James Henstridge and are included with the Automake utility
-# under the following copyright terms:
-#
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# Table of Contents:
-#
-# 1. Language selection
-#    and routines to produce programs in a given language.
-#
-# 2. Producing programs in a given language.
-#
-# 3. Looking for a compiler
-#    And possibly the associated preprocessor.
-#
-# 4. Looking for specific libs & functionality
-
-
-## ----------------------- ##
-## 1. Language selection.  ##
-## ----------------------- ##
-
-
-# AC_LANG(Python)
-# ---------------
-AC_LANG_DEFINE([Python], [py], [PY], [PYTHON], [],
-[ac_ext=py
-ac_compile='chmod +x conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
-ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest 
>&AS_MESSAGE_LOG_FD'
-])
-
-
-# AC_LANG_PYTHON
-# --------------
-AU_DEFUN([AC_LANG_PYTHON], [AC_LANG(Python)])
-
-
-## ----------------------- ##
-## 2. Producing programs.  ##
-## ----------------------- ##
-
-
-# AC_LANG_PROGRAM(Python)([PROLOGUE], [BODY])
-# -------------------------------------------
-m4_define([AC_LANG_PROGRAM(Python)], [dnl
-@%:@!$PYTHON
-$1
-m4_if([$2], [], [], [dnl
-if __name__ == '__main__':
-$2])])
-
-
-# _AC_LANG_IO_PROGRAM(Python)
-# ---------------------------
-# Produce source that performs I/O.
-m4_define([_AC_LANG_IO_PROGRAM(Python)],
-[AC_LANG_PROGRAM([dnl
-import sys
-try:
-    h = open('conftest.out')
-except:
-    sys.exit(1)
-else:
-    close(h)
-    sys.exit(0)
-], [])])
-
-
-# _AC_LANG_CALL(Python)([PROLOGUE], [FUNCTION])
-# ---------------------
-# Produce source that calls FUNCTION
-m4_define([_AC_LANG_CALL(Python)],
-[AC_LANG_PROGRAM([$1], [$2])])
-
-
-## -------------------------------------------- ##
-## 3. Looking for Compilers and Interpreters.   ##
-## -------------------------------------------- ##
-
-
-AC_DEFUN([AC_LANG_COMPILER(Python)],
-[AC_REQUIRE([PC_PROG_PYTHON])])
-
-
-# PC_INIT([MIN-VERSION], [MAX-VERSION]) 
-# -----------------------------
-# Initialize pyconfigure, finding a Python interpreter with a given
-# minimum and/or maximum version. 
-AC_DEFUN([PC_INIT],
-[PC_PROG_PYTHON([], [$1], [$2])
-dnl If we found something, do a sanity check that the interpreter really
-dnl has the version its name would suggest.
-m4_ifval([PYTHON],
-        [PC_PYTHON_VERIFY_VERSION([>=], [pc_min_ver], [],
-                  [AC_MSG_FAILURE([No compatible Python interpreter found. If 
you're sure that you have one, try setting the PYTHON environment variable to 
the location of the interpreter.])])])
-m4_ifval([PYTHON],
-        [PC_PYTHON_VERIFY_VERSION([<=], [pc_max_ver], [],
-                  [AC_MSG_FAILURE([No compatible Python interpreter found. If 
you're sure that you have one, try setting the PYTHON environment variable to 
the location of the interpreter.])])])
-])# PC_INIT
-
-# PC_PROG_PYTHON([PROG-TO-CHECK-FOR], [MIN-VERSION], [MAX-VERSION])
-# ---------------------------------
-# Find a Python interpreter.  Python versions prior to 2.0 are not
-# supported. (2.0 was released on October 16, 2000).
-AC_DEFUN_ONCE([PC_PROG_PYTHON],
-[AC_ARG_VAR([PYTHON], [the Python interpreter])
-dnl The default minimum version is 2.0
-m4_define_default([pc_min_ver], m4_ifval([$2], [$2], [2.0]))
-dnl The default maximum version is 3.3
-m4_define_default([pc_max_ver], m4_ifval([$3], [$3], [4.0]))
-dnl Build up a list of possible interpreter names. 
-m4_define_default([_PC_PYTHON_INTERPRETER_LIST],
-    [dnl If we want some Python 3 versions (max version >= 3.0), 
-dnl also search for "python3"
-     m4_if(m4_version_compare(pc_max_ver, [2.9]), [1], [python3], []) \
-dnl If we want some Python 2 versions (min version <= 2.7),
-dnl also search for "python2".
-     m4_if(m4_version_compare(pc_min_ver, [2.8]), [-1], [python2], []) \
-dnl Construct a comma-separated list of interpreter names (python2.6, 
-dnl python2.7, etc). We only care about the first 3 characters of the
-dnl version strings (major-dot-minor; not 
-dnl major-dot-minor-dot-bugfix[-dot-whatever])
-     m4_foreach([pc_ver], 
-                    m4_esyscmd_s(seq -s[[", "]] -f["[[%.1f]]"] 
m4_substr(pc_max_ver, [0], [3]) -0.1 m4_substr(pc_min_ver, [0], [3])),
-dnl Remove python2.8 and python2.9 since they will never exist
-                    [m4_bmatch(pc_ver, [2.[89]], [], [python]pc_ver)]) \
-     [python]])
-dnl Do the actual search at last.
-m4_ifval([$1],
-       [AC_PATH_PROGS(PYTHON, [$1 _PC_PYTHON_INTERPRETER_LIST])],
-       [AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])])
-])# PC_PROG_PYTHON
-  
-
-# PC_PYTHON_PROG_PYTHON_CONFIG(PROG-TO-CHECK-FOR)
-# ----------------------------------------------
-# Find the python-config program
-AC_DEFUN([PC_PYTHON_PROG_PYTHON_CONFIG],
-[AC_REQUIRE([PC_PROG_PYTHON])[]dnl
-AC_ARG_VAR([PYTHON_CONFIG], [the Python-config program])
-dnl python-config's binary name is normally based on the Python interpreter's
-dnl binary name (i.e. python2.7 -> python2.7-config)
-m4_define([_PYTHON_BASENAME], [`basename $PYTHON`])
-m4_ifval([$1],
-       [AC_PATH_PROGS(PYTHON_CONFIG, [$1 _PYTHON_BASENAME-config])],
-       [AC_PATH_PROG(PYTHON_CONFIG, _PYTHON_BASENAME-config)])
-]) # PC_PYTHON_PROG_PYTHON_CONFIG
-
-
-# PC_PYTHON_VERIFY_VERSION([RELATION], [VERSION], [ACTION-IF-TRUE], 
[ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version [RELATION] 
VERSION.
-# i.e if RELATION is "<", check if PROG has a version number less than VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# Specify RELATION as any mathematical comparison "<", ">", "<=", ">=", "==" 
or "!="
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([PC_PYTHON_VERIFY_VERSION],
-[m4_define([pc_python_safe_ver], m4_bpatsubsts($2, [\.], [_]))
-AC_CACHE_CHECK([if Python $1 '$2'],
-    [[pc_cv_python_req_version_]pc_python_safe_ver],
-    [AC_LANG_PUSH(Python)[]dnl
-     AC_RUN_IFELSE(
-        [AC_LANG_PROGRAM([dnl
-import sys
-], [dnl
-    # split strings by '.' and convert to numeric.  Append some zeros
-    # because we need at least 4 digits for the hex conversion.
-    # map returns an iterator in Python 3.0 and a list in 2.x
-    reqver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-    reqverhex = 0
-    # xrange is not present in Python 3.0 and range returns an iterator
-    for i in list(range(4)):
-        reqverhex = (reqverhex << 8) + reqver[[i]]
-    # the final 8 bits are "0xf0" for final versions, which are all
-    # we'll test against, since it's doubtful that a released software
-    # will depend on an alpha- or beta-state Python.
-    reqverhex += 0xf0
-    if sys.hexversion $1 reqverhex:
-        sys.exit()
-    else:
-        sys.exit(1)
-])], 
-         [[pc_cv_python_req_version_]pc_python_safe_ver=yes], 
-         [[pc_cv_python_req_version_]pc_python_safe_ver=no])
-     AC_LANG_POP(Python)[]dnl
-    ])
-AS_IF([test "$[pc_cv_python_req_version_]pc_python_safe_ver" = "no"], [$4], 
[$3])
-])# PC_PYTHON_VERIFY_VERSION
-
-
-# PC_PYTHON_CHECK_VERSION
-# -----------------------
-# Query Python for its version number.  Getting [:3] seems to be
-# the best way to do this; it's what "site.py" does in the standard
-# library.
-AC_DEFUN([PC_PYTHON_CHECK_VERSION],
-[AC_REQUIRE([PC_PROG_PYTHON])[]dnl
-AC_CACHE_CHECK([for $1 version], 
-    [pc_cv_python_version],
-    [AC_LANG_PUSH(Python)[]dnl
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-], [dnl
-    sys.stdout.write(sys.version[[:3]])
-])],
-                   [pc_cv_python_version=`./conftest`],
-                   [AC_MSG_FAILURE([failed to run Python program])])
-     AC_LANG_POP(Python)[]dnl
-    ])
-AC_SUBST([PYTHON_VERSION], [$pc_cv_python_version])
-])# PC_PYTHON_CHECK_VERSION
-
-
-# PC_PYTHON_CHECK_PREFIX
-# ----------------------
-# Use the value of $prefix for the corresponding value of
-# PYTHON_PREFIX. This is made a distinct variable so it can be
-# overridden if need be.  However, general consensus is that you
-# shouldn't need this ability. 
-AC_DEFUN([PC_PYTHON_CHECK_PREFIX],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to get it with python-config otherwise do it from within Python
-AC_CACHE_CHECK([for Python prefix], [pc_cv_python_prefix],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD`
-else
-    AC_LANG_PUSH(Python)[]dnl
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-], [dnl
-    sys.stdout.write(sys.prefix)
-])], [pc_cv_python_prefix=`./conftest`;
-      if test $? != 0; then
-         AC_MSG_FAILURE([could not determine Python prefix])
-      fi],
-      [AC_MSG_FAILURE([failed to run Python program])])
-    AC_LANG_POP(Python)[]dnl
-fi])
-AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])])
-
-
-# PC_PYTHON_CHECK_EXEC_PREFIX
-# --------------------------
-# Like above, but for $exec_prefix
-AC_DEFUN([PC_PYTHON_CHECK_EXEC_PREFIX],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to get it with python-config otherwise do it from within Python
-AC_CACHE_CHECK([for Python exec-prefix], [pc_cv_python_exec_prefix],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 
2>&AS_MESSAGE_LOG_FD`
-else
-    AC_LANG_PUSH(Python)[]dnl
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-], [dnl
-    sys.stdout.write(sys.exec_prefix)
-])],
-        [pc_cv_python_exec_prefix=`./conftest`;
-         if test $? != 0; then
-            AC_MSG_FAILURE([could not determine Python exec_prefix])
-         fi],
-         [AC_MSG_FAILURE([failed to run Python program])])
-    AC_LANG_POP(Python)[]dnl
-fi
-])
-AC_SUBST([PYTHON_EXEC_PREFIX], [$pc_cv_python_exec_prefix])])
-
-
-# PC_PYTHON_CHECK_INCLUDES
-# ------------------------
-# Find the Python header file include flags (ie
-# '-I/usr/include/python')
-AC_DEFUN([PC_PYTHON_CHECK_INCLUDES],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the headers location with python-config otherwise guess
-AC_CACHE_CHECK([for Python includes], [pc_cv_python_includes],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&AS_MESSAGE_LOG_FD`
-else
-    
pc_cv_python_includes="[-I$includedir/$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS,
-    PYTHON_ABI_FLAGS,)"
-fi
-])
-AC_SUBST([PYTHON_INCLUDES], [$pc_cv_python_includes])])
-
-
-# PC_PYTHON_CHECK_HEADERS([ACTION-IF-PRESENT], [ACTION-IF-ABSENT])
-# -----------------------
-# Check for the presence and usability of Python.h
-AC_DEFUN([PC_PYTHON_CHECK_HEADERS],
-[AC_REQUIRE([PC_PYTHON_CHECK_INCLUDES])[]dnl
-pc_cflags_store=$CPPFLAGS
-CPPFLAGS="$CFLAGS $PYTHON_INCLUDES"
-AC_CHECK_HEADER([Python.h], [$1], [$2])
-CPPFLAGS=$pc_cflags_store
-])
-
-
-# PC_PYTHON_CHECK_LIBS
-# --------------------
-# Find the Python lib flags (ie '-lpython')
-AC_DEFUN([PC_PYTHON_CHECK_LIBS],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the lib flags with python-config otherwise guess
-AC_CACHE_CHECK([for Python libs], [pc_cv_python_libs],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&AS_MESSAGE_LOG_FD`
-else
-    pc_cv_python_libs="[-l$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, 
PYTHON_ABI_FLAGS,)"
-fi
-])
-AC_SUBST([PYTHON_LIBS], [$pc_cv_python_libs])])
-
-
-# PC_PYTHON_TEST_LIBS(LIBRARY-FUNCTION, [ACTION-IF-PRESENT], 
[ACTION-IF-ABSENT])
-# -------------------
-# Verify that the Python libs can be loaded
-AC_DEFUN([PC_PYTHON_TEST_LIBS],
-[AC_REQUIRE([PC_PYTHON_CHECK_LIBS])[]dnl
-pc_libflags_store=$LIBS
-for lflag in $PYTHON_LIBS; do
-    case $lflag in
-        -lpython*@:}@
-               LIBS="$LIBS $lflag"
-               pc_libpython=`echo $lflag | sed -e 's/^-l//'`
-               ;;
-         *@:}@;;
-    esac
-done
-AC_CHECK_LIB([$pc_libpython], [$1], [$2], [$3])])
-
-
-# PC_PYTHON_CHECK_CFLAGS
-# ----------------------
-# Find the Python CFLAGS
-AC_DEFUN([PC_PYTHON_CHECK_CFLAGS],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the CFLAGS with python-config otherwise give up
-AC_CACHE_CHECK([for Python CFLAGS], [pc_cv_python_cflags],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&AS_MESSAGE_LOG_FD`
-else
-    pc_cv_python_cflags=
-fi
-])
-AC_SUBST([PYTHON_CFLAGS], [$pc_cv_python_cflags])])
-
-
-# PC_PYTHON_CHECK_LDFLAGS
-# -----------------------
-# Find the Python LDFLAGS
-AC_DEFUN([PC_PYTHON_CHECK_LDFLAGS],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the LDFLAGS with python-config otherwise give up
-AC_CACHE_CHECK([for Python LDFLAGS], [pc_cv_python_ldflags],
-[if test -x "$PYTHON_CONFIG"; then
-    pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&AS_MESSAGE_LOG_FD`
-else
-    pc_cv_python_ldflags=
-fi
-])
-AC_SUBST([PYTHON_LDFLAGS], [$pc_cv_python_ldflags])])
-
-
-# PC_PYTHON_CHECK_EXTENSION_SUFFIX
-# --------------------------------
-# Find the Python extension suffix (i.e. '.cpython-32.so')
-AC_DEFUN([PC_PYTHON_CHECK_EXTENSION_SUFFIX],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the suffix with python-config otherwise give up
-AC_CACHE_CHECK([for Python extension suffix], [pc_cv_python_extension_suffix],
-[if test -x "$PYTHON_CONFIG"; then
-     pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 
2>&AS_MESSAGE_LOG_FD`
-else
-    pc_cv_python_extension_suffix=
-fi
-])
-AC_SUBST([PYTHON_EXTENSION_SUFFIX], [$pc_cv_python_extension_suffix])])
-
-
-# PC_PYTHON_CHECK_ABI_FLAGS
-# -------------------------
-# Find the Python ABI flags
-AC_DEFUN([PC_PYTHON_CHECK_ABI_FLAGS],
-[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
-dnl Try to find the ABI flags with python-config otherwise give up
-AC_CACHE_CHECK([for Python ABI flags], [pc_cv_python_abi_flags],
-[if test -x "$PYTHON_CONFIG"; then
-     pc_cv_python_abi_flags=`$PYTHON_CONFIG --abiflags 2>&AS_MESSAGE_LOG_FD`
-else
-    pc_cv_python_abi_flags=
-fi
-])
-AC_SUBST([PYTHON_ABI_FLAGS], [$pc_cv_python_abi_flags])])
-
-
-# PC_PYTHON_CHECK_PLATFORM
-# ------------------------
-# At times (like when building shared libraries) you may want
-# to know which OS platform Python thinks this is.
-AC_DEFUN([PC_PYTHON_CHECK_PLATFORM],
-[AC_REQUIRE([PC_PROG_PYTHON])[]dnl
-dnl Get the platform from within Python (sys.platform)
-AC_CACHE_CHECK([for Python platform], [pc_cv_python_platform],
-    [AC_LANG_PUSH(Python)[]dnl
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-], [dnl
-    sys.stdout.write(sys.platform)
-])], [pc_cv_python_platform=`./conftest`;
-     if test $? != 0; then
-        AC_MSG_FAILURE([could not determine Python platform])
-     fi],
-     [AC_MSG_FAILURE([failed to run Python program])])
-    AC_LANG_POP(Python)[]dnl
-   ])
-AC_SUBST([PYTHON_PLATFORM], [$pc_cv_python_platform])
-])
-
-
-# PC_PYTHON_CHECK_SITE_DIR
-# ---------------------
-# The directory to which new libraries are installed (i.e. the
-# "site-packages" directory.
-AC_DEFUN([PC_PYTHON_CHECK_SITE_DIR],
-[AC_REQUIRE([PC_PROG_PYTHON])AC_REQUIRE([PC_PYTHON_CHECK_PREFIX])[]dnl
-AC_CACHE_CHECK([for Python site-packages directory],
-    [pc_cv_python_site_dir],
-    [AC_LANG_PUSH(Python)[]dnl
-    if test "x$prefix" = xNONE
-     then
-       pc_py_prefix=$ac_default_prefix
-     else
-       pc_py_prefix=$prefix
-     fi
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-from platform import python_implementation
-# sysconfig in CPython 2.7 doesn't work in virtualenv
-# <https://github.com/pypa/virtualenv/issues/118>
-try:
-    import sysconfig
-except:
-    can_use_sysconfig = False
-else:
-    can_use_sysconfig = True
-if can_use_sysconfig:
-    if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
-        can_use_sysconfig = False
-if not can_use_sysconfig:        
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py_prefix')
-else:
-    sitedir = sysconfig.get_path('purelib', vars={'base':'$pc_py_prefix'})
-], [dnl
-    sys.stdout.write(sitedir)
-])], [pc_cv_python_site_dir=`./conftest`],
-     [AC_MSG_FAILURE([failed to run Python program])])
-     AC_LANG_POP(Python)[]dnl
-     case $pc_cv_python_site_dir in
-     $pc_py_prefix*)
-       pc__strip_prefix=`echo "$pc_py_prefix" | sed 's|.|.|g'`
-       pc_cv_python_site_dir=`echo "$pc_cv_python_site_dir" | sed 
"s,^$pc__strip_prefix/,,"`
-       ;;
-     *)
-       case $pc_py_prefix in
-         /usr|/System*) ;;
-         *)
-         pc_cv_python_site_dir=lib/python$PYTHON_VERSION/site-packages
-         ;;
-       esac
-       ;;
-     esac
-     ])
-AC_SUBST([pythondir], [\${prefix}/$pc_cv_python_site_dir])])# 
PC_PYTHON_CHECK_SITE_DIR
-
-# PC_PYTHON_SITE_PACKAGE_DIR
-# --------------------------
-# $PACKAGE directory under PYTHON_SITE_DIR
-AC_DEFUN([PC_PYTHON_SITE_PACKAGE_DIR],
-[AC_REQUIRE([PC_PYTHON_CHECK_SITE_DIR])[]dnl
-AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE_NAME])])
-
-
-# PC_PYTHON_CHECK_EXEC_DIR
-# ------------------------
-# directory for installing python extension modules (shared libraries)
-AC_DEFUN([PC_PYTHON_CHECK_EXEC_DIR],
-[AC_REQUIRE([PC_PROG_PYTHON])AC_REQUIRE([PC_PYTHON_CHECK_EXEC_PREFIX])[]dnl
-  AC_CACHE_CHECK([for Python extension module directory],
-    [pc_cv_python_exec_dir],
-    [AC_LANG_PUSH(Python)[]dnl
-    if test "x$pc_cv_python_exec_prefix" = xNONE
-     then
-       pc_py_exec_prefix=$pc_cv_python_prefix
-     else
-       pc_py_exec_prefix=$pc_cv_python_exec_prefix
-     fi
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
-import sys
-from platform import python_implementation
-# sysconfig in CPython 2.7 doesn't work in virtualenv
-# <https://github.com/pypa/virtualenv/issues/118>
-try:
-    import sysconfig
-except:
-    can_use_sysconfig = False
-else:
-    can_use_sysconfig = True
-if can_use_sysconfig:
-    if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
-        can_use_sysconfig = False
-if not can_use_sysconfig:        
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(False, False, 
prefix='$pc_py__exec_prefix')
-else:
-    sitedir = sysconfig.get_path('purelib', 
vars={'platbase':'$pc_py_exec_prefix'})
-], [dnl
-    sys.stdout.write(sitedir)
-])], [pc_cv_python_exec_dir=`./conftest`],
-     [AC_MSG_FAILURE([failed to run Python program])])
-     AC_LANG_POP(Python)[]dnl
-     case $pc_cv_python_exec_dir in
-     $pc_py_exec_prefix*)
-       pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'`
-       pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed 
"s,^$pc__strip_prefix/,,"`
-       ;;
-     *)
-       case $pc_py_exec_prefix in
-         /usr|/System*) ;;
-         *)
-          pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages
-          ;;
-       esac
-       ;;
-     esac
-    ])
-AC_SUBST([pyexecdir], [\${exec_prefix}/$pc_cv_python_pyexecdir])]) 
#PY_PYTHON_CHECK_EXEC_LIB_DIR
-
-
-# PC_PYTHON_EXEC_PACKAGE_DIR
-# --------------------------
-# $PACKAGE directory under PYTHON_SITE_DIR
-AC_DEFUN([PC_PYTHON_EXEC_PACKAGE_DIR],
-[AC_REQUIRE([PC_PYTHON_CHECK_EXEC_DIR])[]dnl
-AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE_NAME])])
-
-
-## -------------------------------------------- ##
-## 4. Looking for specific libs & functionality ##
-## -------------------------------------------- ##
-
-
-# PC_PYTHON_CHECK_MODULE(LIBRARY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ----------------------------------------------------------------------
-# Macro for checking if a Python library is installed
-AC_DEFUN([PC_PYTHON_CHECK_MODULE],
-[AC_REQUIRE([PC_PROG_PYTHON])[]dnl
-m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
-AC_CACHE_CHECK([for Python '$1' library],
-    [[pc_cv_python_module_]pc_python_safe_mod],
-    [AC_LANG_PUSH(Python)[]dnl
-     AC_RUN_IFELSE(
-       [AC_LANG_PROGRAM([dnl
-import sys
-try:
-    import $1
-except:
-    sys.exit(1)
-else:
-    sys.exit(0)
-], [])],
-       [[pc_cv_python_module_]pc_python_safe_mod="yes"],
-       [[pc_cv_python_module_]pc_python_safe_mod="no"])
-     AC_LANG_POP(Python)[]dnl
-    ])
-AS_IF([test "$[pc_cv_python_module_]pc_python_safe_mod" = "no"], [$3], [$2])
-])# PC_PYTHON_CHECK_MODULE
-
-
-# PC_PYTHON_CHECK_FUNC([LIBRARY], FUNCTION, ARGS, [ACTION-IF-FOUND], 
[ACTION-IF-NOT-FOUND])
-# 
---------------------------------------------------------------------------------------
-# Check to see if a given function call, optionally from a module, can
-# be successfully called
-AC_DEFUN([PC_PYTHON_CHECK_FUNC],
-[AC_REQUIRE([PC_PROG_PYTHON])[]dnl
-m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
-AC_CACHE_CHECK([for Python m4_ifnblank($1, '$1.$2()', '$2()') function],
-    [[pc_cv_python_func_]pc_python_safe_mod[_$2]],
-    [AC_LANG_PUSH(Python)[]dnl
-     AC_RUN_IFELSE(
-       [AC_LANG_PROGRAM([dnl
-import sys
-m4_ifnblank([$1], [dnl
-try:
-    import $1
-except:
-    sys.exit(1)
-], [])], 
-[
-m4_ifnblank([$1], [
-    try:
-        $1.$2($3)], [
-    try:
-        $2($3)])
-    except:
-        sys.exit(1)
-    else:
-        sys.exit(0)
-])],
-       [[pc_cv_python_func_]pc_python_safe_mod[_$2]="yes"],
-       [[pc_cv_python_func_]pc_python_safe_mod[_$2]="no"])
-     AC_LANG_POP(Python)[]dnl
-    ])
-AS_IF([test "$[pc_cv_python_func_]pc_python_safe_mod[_$2]" = "no"], [$5], [$4])
-])# PC_PYTHON_CHECK_FUNC
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..4974cdf
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+"""Django's command-line utility for administrative tasks."""
+import os
+import sys
+
+def main():
+    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'talerbank.settings')
+    try:
+        from django.core.management import execute_from_command_line
+    except ImportError as exc:
+        raise ImportError(
+            "Couldn't import Django. Are you sure it's installed and "
+            "available on your PYTHONPATH environment variable? Did you "
+            "forget to activate a virtual environment?"
+        ) from exc
+    execute_from_command_line(sys.argv)
+
+if __name__ == '__main__':
+    main()
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 840a0e8..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Django==1.9.5
-psycopg2==2.6.1
-requests==2.9.1
-uWSGI==2.0.12
diff --git a/run-tests.sh b/run-tests.sh
new file mode 100755
index 0000000..62ccabf
--- /dev/null
+++ b/run-tests.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+# See Bug #5850 for some tests that are currently skipped
+
+export TALER_CONFIG_FILE="talerbank/app/testconfigs/bank-check.conf"
+./manage.py test --no-input talerbank.app.tests
diff --git a/setup.py b/setup.py
index 1b979a2..14c6ace 100755
--- a/setup.py
+++ b/setup.py
@@ -3,11 +3,11 @@
 from setuptools import setup, find_packages
 
 setup(name='talerbank',
-      version='0.0',
+      version='0.6.0pre1',
       description='Taler friendly bank',
       url='git://taler.net/bank',
       author='Marcello Stanisci, Florian Dold',
-      author_email='address@hidden, address@hidden',
+      author_email='address@hidden, address@hidden',
       license='GPL',
       packages=find_packages(),
       install_requires=["django>=2",
@@ -18,7 +18,7 @@ setup(name='talerbank',
                         "jinja2",
                         "pylint",
                         "django-lint"],
-
+      scripts=["./bin/taler-bank-manage"],
       package_data={
         'talerbank.app': [
             'templates/*.html',
@@ -29,5 +29,4 @@ setup(name='talerbank',
             'static/*.css',
             ]
       },
-      scripts=['taler-bank-manage'],
       zip_safe=False)
diff --git a/taler-bank-manage.in b/taler-bank-manage.in
deleted file mode 100644
index 016ec3c..0000000
--- a/taler-bank-manage.in
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env python3
-
-##
-# This file is part of TALER
-# (C) 2017 INRIA
-#
-# TALER is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Affero General Public
-# License as published by the Free Software Foundation; either
-# version 3, or (at your option) any later version.
-#
-# TALER is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty
-# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with TALER; see the file COPYING.  If not,
-# see <http://www.gnu.org/licenses/>
-#
-#  @author Florian Dold
-#  @file CLI tool to manage all the bank's tasks.
-
-import argparse
-import django
-import sys
-import os
-import site
-import logging
-
-os.environ.setdefault("TALER_PREFIX", "@prefix@")
-SITE_PACKAGES = "%s/lib/python%d.%d/site-packages" % (
-    "@prefix@",
-    sys.version_info.major,
-    sys.version_info.minor)
-
-site.addsitedir(SITE_PACKAGES)
-
-from talerbank.talerconfig import TalerConfig
-from django.core.management import call_command
-
-
-## Not commenting global variables, at least for now.
-# @cond
-LOGGER = logging.getLogger(__name__)
-
-# No perfect match to our logging format, but good enough ...
-UWSGI_LOGFMT = "%(ltime) %(proto) %(method) %(uri) %(proto) => %(status)"
-## @endcond
-
-##
-# This function interprets the 'django' subcommand.
-# This command usually manages database tasks, and in
-# general what is not related to running the bank.
-#
-# @param args command line options.
-def handle_django(args):
-    django.setup()
-    # always run 'migrate' first, in case a virgin db is being used.
-    call_command('migrate')
-    from django.core.management import execute_from_command_line
-    execute_from_command_line([sys.argv[0] + " django"] + args.command)
-
-##
-# This function interprets the 'serve-http' subcommand.
-# The effect it to launch the bank HTTP service.
-#
-# @param args command line options.
-def handle_serve_http(args):
-    import django
-    django.setup()
-    call_command('migrate')
-    call_command('provide_accounts')
-    call_command('check')
-    port = args.port
-    TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE", 
args.config))
-    if port is None:
-        port = TC["bank"]["http_port"].value_int(required=True)
-
-    httpspec = ":%d" % (port,)
-    params = ["uwsgi", "uwsgi",
-              "--static-map", "/static=%s/talerbank/app/static" % 
SITE_PACKAGES,
-              "--master",
-              "--die-on-term",
-              "--http", httpspec,
-              "--log-format", UWSGI_LOGFMT,
-              "--wsgi-file", "@prefix@/share/taler-bank/bank.wsgi"]
-    os.execlp(*params)
-
-##
-# This function interprets the 'serve-uwsgi' subcommand.
-# The effect is to launch the bank UWSGI service.  This
-# type of service is usually used when the HTTP bank interface
-# is accessed via a reverse proxy (like Nginx, for example).
-#
-# @param command line options.
-def handle_serve_uwsgi(args):
-    django.setup()
-    call_command('migrate')
-    call_command('provide_accounts')
-    call_command('check')
-    TC = TalerConfig.from_file(os.environ.get("TALER_CONFIG_FILE", 
args.config))
-    serve_uwsgi = TC["bank"]["uwsgi_serve"].value_string(required=True).lower()
-    params = ["uwsgi", "uwsgi",
-              "--master",
-              "--static-map", "/static=%s/talerbank/app/static" % 
SITE_PACKAGES,
-              "--die-on-term",
-              "--log-format", UWSGI_LOGFMT,
-              "--wsgi-file", "@prefix@/share/taler-bank/bank.wsgi"]
-    if serve_uwsgi == "tcp":
-        port = TC["bank"]["uwsgi_port"].value_int(required=True)
-        spec = ":%d" % (port,)
-        params.extend(["--socket", spec])
-    else:
-        spec = TC["bank"]["uwsgi_unixpath"].value_filename(required=True)
-        mode = TC["bank"]["uwsgi_unixpath_mode"].value_filename(required=True)
-        params.extend(["--socket", spec])
-        params.extend(["--chmod-socket="+mode])
-        os.makedirs(os.path.dirname(spec), exist_ok=True)
-    logging.info("launching uwsgi with argv %s", params[1:])
-    os.execlp(*params)
-
-##
-# Currently deprecated.
-def handle_sampledata():
-    django.setup()
-    call_command('sample_donations')
-
-
-##
-# Interprets the '--config' option.
-#
-# @param args command line options.
-def handle_config(args):
-    TC.from_file(args.config)
-    TC.dump()
-
-
-## Not commenting global variables, at least for now.
-# @cond
-PARSER = argparse.ArgumentParser()
-PARSER.set_defaults(func=None)
-PARSER.add_argument('--config', '-c', help="configuration file to use",
-                    metavar="CONFIG", type=str, dest="config", default=None)
-PARSER.add_argument('--with-db', type=str, metavar="dbtype:///dbname", 
dest="altdb",
-                    help="use 'dbname' (currently only 'dbtype'=='postgres' is 
supported)")
-SUB = PARSER.add_subparsers()
-
-P = SUB.add_parser('django', help="Run django-admin command")
-P.add_argument("command", nargs=argparse.REMAINDER)
-P.set_defaults(func=handle_django)
-
-P = SUB.add_parser('serve-http', help="Serve bank over HTTP")
-P.add_argument("--port", "-p", dest="port", type=int,
-               default=None, metavar="PORT")
-P.set_defaults(func=handle_serve_http)
-
-P = SUB.add_parser('serve-uwsgi', help="Serve bank over UWSGI")
-P.set_defaults(func=handle_serve_uwsgi)
-
-P = SUB.add_parser('config', help="show config")
-P.set_defaults(func=handle_config)
-
-
-ARGS = PARSER.parse_args()
-
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "talerbank.settings")
-
-if ARGS.altdb:
-    LOGGER.info("Setting alternate db: %s" % ARGS.altdb)
-    os.environ.setdefault("TALER_BANK_ALTDB", ARGS.altdb)
-
-if getattr(ARGS, 'func', None) is None:
-    PARSER.print_help()
-    sys.exit(1)
-
-if ARGS.config is not None:
-    os.environ["TALER_CONFIG_FILE"] = ARGS.config
-
-try:
-    ARGS.func(ARGS)
-except django.db.utils.OperationalError as error:
-    LOGGER.error(error)
-    sys.exit(4)
-## @endcond
diff --git a/talerbank/Makefile.am b/talerbank/Makefile.am
deleted file mode 100644
index 85ea8f7..0000000
--- a/talerbank/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-SUBDIRS = . app
-
-EXTRA_DIST = \
- jinja2.py \
- settings.py \
- talerconfig.py \
- urls.py \
- wsgi.py \
- __init__.py
diff --git a/talerbank/app/Makefile.am b/talerbank/app/Makefile.am
deleted file mode 100644
index 0af3d65..0000000
--- a/talerbank/app/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-SUBDIRS = . management migrations templates static
-
-EXTRA_DIST = \
-  admin.py \
-  schemas.py \
-  urls.py \
-  views.py \
-  amount.py \
-  __init__.py \
-  models.py \
-  tests.py \
-  tests_alt.py \
-  middleware.py
diff --git a/talerbank/app/management/Makefile.am 
b/talerbank/app/management/Makefile.am
deleted file mode 100644
index 6471e5c..0000000
--- a/talerbank/app/management/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-SUBDIRS = . commands
-
-EXTRA_DIST = \
-  __init__.py
diff --git a/talerbank/app/management/commands/Makefile.am 
b/talerbank/app/management/commands/Makefile.am
deleted file mode 100644
index cec82a7..0000000
--- a/talerbank/app/management/commands/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-SUBDIRS = .
-
-EXTRA_DIST = \
-  dump_talerdb.py \
-  __init__.py \
-  provide_accounts.py
diff --git a/talerbank/app/migrations/Makefile.am 
b/talerbank/app/migrations/Makefile.am
deleted file mode 100644
index c2817bd..0000000
--- a/talerbank/app/migrations/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-SUBDIRS = .
-
-EXTRA_DIST = \
-0001_squashed_0013_remove_banktransaction_reimburses.py \
-__init__.py
diff --git a/talerbank/app/static/Makefile.am b/talerbank/app/static/Makefile.am
deleted file mode 100644
index b393a6c..0000000
--- a/talerbank/app/static/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-SUBDIRS = . web-common
-
-EXTRA_DIST = \
-  favicon.ico \
-  bank.css \
-  disabled-button.css
diff --git a/talerbank/app/templates/Makefile.am 
b/talerbank/app/templates/Makefile.am
deleted file mode 100644
index 15f8023..0000000
--- a/talerbank/app/templates/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-SUBDIRS = .
-
-EXTRA_DIST = \
-  base.html \
-  account_disabled.html \
-  profile_page.html \
-  public_accounts.html \
-  pin_tan.html \
-  register.html \
-  login.html \
-  error_exchange.html
diff --git a/bank-check-alt-badamount.conf 
b/talerbank/app/testconfigs/bank-check-alt-badamount.conf
similarity index 100%
rename from bank-check-alt-badamount.conf
rename to talerbank/app/testconfigs/bank-check-alt-badamount.conf
diff --git a/bank-check-alt-nocurrency.conf 
b/talerbank/app/testconfigs/bank-check-alt-nocurrency.conf
similarity index 100%
rename from bank-check-alt-nocurrency.conf
rename to talerbank/app/testconfigs/bank-check-alt-nocurrency.conf
diff --git a/bank-check.conf b/talerbank/app/testconfigs/bank-check.conf
similarity index 100%
rename from bank-check.conf
rename to talerbank/app/testconfigs/bank-check.conf
diff --git a/unused.conf b/unused.conf
deleted file mode 100644
index 485ef05..0000000
--- a/unused.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[bank]
-
-database = postgres:///unused

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]