diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-02-15 04:05:09 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-02-15 04:05:09 +0000 |
commit | ae8a567adb7cc36898fe65ed9ce7b5c016acf924 (patch) | |
tree | 5d6def96016f19d60f4689b608de84813005a0b3 | |
parent | ea4dad2ffcfd40608691cbf824d535bfe039c1d8 (diff) | |
download | qpid-python-ae8a567adb7cc36898fe65ed9ce7b5c016acf924.tar.gz |
removed Makefile and preppy script as they are now subsumed by setup.py
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@910160 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/python/Makefile | 78 | ||||
-rwxr-xr-x | qpid/python/preppy | 67 |
2 files changed, 0 insertions, 145 deletions
diff --git a/qpid/python/Makefile b/qpid/python/Makefile deleted file mode 100644 index ebae6a8ea4..0000000000 --- a/qpid/python/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -PREFIX=/usr/local -EXEC_PREFIX=$(PREFIX)/bin -DATA_DIR=$(PREFIX)/share - -PYTHON_LIB=$(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='$(PREFIX)')") -PYTHON_VERSION=$(shell python -c "from distutils.sysconfig import get_python_version; print get_python_version()") - -ddfirst=$(shell ddir=$(DATA_DIR) && echo $${ddir:0:1}) -ifeq ($(ddfirst),/) -AMQP_SPEC_DIR=$(DATA_DIR)/amqp -else -AMQP_SPEC_DIR=$(PWD)/$(DATA_DIR)/amqp -endif - -DIRS=qpid mllib examples -SRCS=$(shell find $(DIRS) -name "*.py") qpid_config.py -BUILD=build -TARGETS=$(SRCS:%.py=$(BUILD)/%.py) - -PYCC=python -O -c "import compileall; compileall.main()" - -all: build - -$(BUILD)/%.py: %.py - @mkdir -p $(shell dirname $@) - ./preppy $(PYTHON_VERSION) < $< > $@ - -build: $(TARGETS) - -.PHONY: doc - -doc: - @mkdir -p $(BUILD) - PYTHONPATH=. epydoc -v qpid.messaging -o $(BUILD)/doc --no-private --no-sourcecode --include-log - -install: build - install -d $(PYTHON_LIB) - - install -d $(PYTHON_LIB)/mllib - install -pm 0644 LICENSE.txt NOTICE.txt $(BUILD)/mllib/*.* $(PYTHON_LIB)/mllib - $(PYCC) $(PYTHON_LIB)/mllib - - install -d $(PYTHON_LIB)/qpid - install -pm 0644 LICENSE.txt NOTICE.txt README.txt $(BUILD)/qpid/*.* $(PYTHON_LIB)/qpid - TDIR=$(shell mktemp -d) && \ - sed s@AMQP_SPEC_DIR=.*@AMQP_SPEC_DIR='"$(AMQP_SPEC_DIR)"'@ \ - $(BUILD)/qpid_config.py > $${TDIR}/qpid_config.py && \ - install -pm 0644 $${TDIR}/qpid_config.py $(PYTHON_LIB) && \ - rm -rf $${TDIR} - - install -d $(PYTHON_LIB)/qpid/tests - install -pm 0644 $(BUILD)/qpid/tests/*.* $(PYTHON_LIB)/qpid/tests - $(PYCC) $(PYTHON_LIB)/qpid - - install -d $(EXEC_PREFIX) - install -pm 0755 qpid-python-test $(EXEC_PREFIX) - -clean: - rm -rf $(BUILD) diff --git a/qpid/python/preppy b/qpid/python/preppy deleted file mode 100755 index 22893dad03..0000000000 --- a/qpid/python/preppy +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -import os, re, sys - -ann = re.compile(r"([ \t]*)@([_a-zA-Z][_a-zA-Z0-9]*)([ \t\n\r]+def[ \t]+)([_a-zA-Z][_a-zA-Z0-9]*)") -line = re.compile(r"\n([ \t]*)[^ \t\n#]+") - -if len(sys.argv) == 2: - major, minor = [int(p) for p in sys.argv[1].split(".")] -elif len(sys.argv) == 1: - major, minor = sys.version_info[0:2] -else: - print "usage: %s [ version ] < input.py > output.py" % sys.argv[0] - sys.exit(-1) - -if major <= 2 and minor <= 3: - def process(input): - output = "" - pos = 0 - while True: - m = ann.search(input, pos) - if m: - indent, decorator, idef, function = m.groups() - output += input[pos:m.start()] - output += "%s#@%s%s%s" % (indent, decorator, idef, function) - pos = m.end() - - subst = "\n%s%s = %s(%s)\n" % (indent, function, decorator, function) - npos = pos - while True: - n = line.search(input, npos) - if not n: - input += subst - break - if len(n.group(1)) <= len(indent): - idx = n.start() - input = input[:idx] + subst + input[idx:] - break - npos = n.end() - else: - break - - output += input[pos:] - return output -else: - def process(input): - return input - -sys.stdout.write(process(sys.stdin.read())) |