summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile25
-rw-r--r--config.mak.in2
-rw-r--r--misc/strip_ext.py15
-rwxr-xr-xsetup_pkgloader.py14
-rwxr-xr-xsetup_skytools.py (renamed from setup.py)16
-rw-r--r--source.cfg2
6 files changed, 37 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index 86c5885e..976597d3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,10 @@ pyver = $(shell $(PYTHON) -V 2>&1 | sed 's/^[^ ]* \([0-9]*\.[0-9]*\).*/\1/')
SUBDIRS = sql doc
+SCRIPTS = python/londiste.py python/qadmin.py python/pgqadm.py python/walmgr.py \
+ scripts/queue_loader.py scripts/queue_mover.py scripts/queue_splitter.py \
+ scripts/scriptmgr.py scripts/skytools_upgrade.py
+
all: python-all sub-all config.mak
install: sub-install python-install
@@ -19,10 +23,10 @@ sub-all sub-install sub-clean sub-distclean:
.PHONY: sub-all sub-clean sub-install sub-distclean
python-all: config.mak
- $(PYTHON) setup.py build
+ $(PYTHON) setup_skytools.py build
clean: sub-clean
- $(PYTHON) setup.py clean
+ $(PYTHON) setup_skytools.py clean
rm -rf build
find python -name '*.py[oc]' -print | xargs rm -f
rm -f python/skytools/installer_config.py source.list
@@ -40,10 +44,17 @@ modules-install: config.mak
test \! -d compat || $(MAKE) -C compat $@ DESTDIR=$(DESTDIR)
python-install: config.mak sub-all
- $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR)/ --record=tmp_files.lst
- grep '/bin/[a-z_0-9]*.py' tmp_files.lst \
- | $(PYTHON) misc/strip_ext.py $(if $(DESTDIR), $(DESTDIR), /)
- rm -f tmp_files.lst
+ mkdir -p $(DESTDIR)/$(bindir)
+ $(PYTHON) setup_pkgloader.py install --prefix=$(prefix) --root=$(DESTDIR)/
+ $(PYTHON) setup_skytools.py install --prefix=$(prefix) --root=$(DESTDIR)/ --record=tmp_files.lst \
+ --install-lib=$(prefix)/lib/python$(pyver)/site-packages/skytools-3.0
+ for s in $(SCRIPTS); do \
+ exe=`echo $$s|sed -e 's!.*/!!' -e 's/[.]py//'`; \
+ install $$s $(DESTDIR)/$(bindir)/$$exe || exit 1; \
+ done
+ #grep '/bin/[a-z_0-9]*.py' tmp_files.lst \
+ #| $(PYTHON) misc/strip_ext.py $(if $(DESTDIR), $(DESTDIR), /)
+ #rm -f tmp_files.lst
$(MAKE) -C doc DESTDIR=$(DESTDIR) install
python-install python-all: python/skytools/installer_config.py
@@ -93,7 +104,7 @@ deb84:
tgz: config.mak clean
$(MAKE) -C doc man html
rm -f source.list
- $(PYTHON) setup.py sdist -t source.cfg -m source.list
+ $(PYTHON) setup_skytools.py sdist -t source.cfg -m source.list
debclean: distclean
rm -rf debian/tmp-* debian/build* debian/control debian/packages-tmp*
diff --git a/config.mak.in b/config.mak.in
index bc7f41ce..894c8c98 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -11,7 +11,7 @@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
-override PYTHON = @PYTHON@
+PYTHON = @PYTHON@
override PG_CONFIG = @PG_CONFIG@
# additional CPPFLAGS to pgxs modules
diff --git a/misc/strip_ext.py b/misc/strip_ext.py
deleted file mode 100644
index 240cc04b..00000000
--- a/misc/strip_ext.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /usr/bin/env python
-
-import sys, os, os.path
-
-while 1:
- fn = sys.stdin.readline().strip()
- if not fn:
- break
- full1 = os.path.join(sys.argv[1], fn)
- full2 = os.path.splitext(full1)[0]
- if full1 == full2:
- continue
- print full1, full2
- os.rename(full1, full2)
-
diff --git a/setup_pkgloader.py b/setup_pkgloader.py
new file mode 100755
index 00000000..28b15d73
--- /dev/null
+++ b/setup_pkgloader.py
@@ -0,0 +1,14 @@
+#! /usr/bin/env python
+
+from distutils.core import setup
+
+setup(
+ name = "pkgloader",
+ license = "BSD",
+ version = '1.0',
+ maintainer = "Marko Kreen",
+ maintainer_email = "markokr@gmail.com",
+ package_dir = {'': 'python'},
+ py_modules = ['pkgloader'],
+)
+
diff --git a/setup.py b/setup_skytools.py
index 7f9ab704..0e1628d9 100755
--- a/setup.py
+++ b/setup_skytools.py
@@ -1,5 +1,8 @@
#! /usr/bin/env python
+# this script does not perform full installation,
+# it is meant for use from Makefile
+
import sys, os.path, re
from distutils.core import setup
from distutils.extension import Extension
@@ -34,19 +37,6 @@ setup(
url = "http://pgfoundry.org/projects/skytools/",
package_dir = {'': 'python'},
packages = ['skytools', 'londiste', 'pgq', 'pgq.cascade'],
- scripts = ['python/londiste.py',
- 'python/qadmin.py',
- 'python/pgqadm.py',
- 'python/walmgr.py',
- 'scripts/bulk_loader.py',
- 'scripts/cube_dispatcher.py',
- 'scripts/queue_loader.py',
- 'scripts/queue_mover.py',
- 'scripts/queue_splitter.py',
- 'scripts/scriptmgr.py',
- 'scripts/skytools_upgrade.py',
- 'scripts/table_dispatcher.py',
- ],
data_files = [
('share/doc/skytools/conf', [
'python/conf/wal-master.ini',
diff --git a/source.cfg b/source.cfg
index 21ca1d41..3cab494d 100644
--- a/source.cfg
+++ b/source.cfg
@@ -6,7 +6,7 @@ include Makefile COPYRIGHT README NEWS config.mak.in configure configure.ac sour
recursive-include sql *.sql Makefile *.out *.in *.[ch] README* *.ini *.templ
recursive-include python/conf *.ini
-recursive-include misc *.sh *.rc *.py Cindent
+recursive-include misc *.sh *.rc *.py *.css Cindent
recursive-include scripts *.py *.templ *.ini
recursive-include lib *.[ch] Makefile Setup.mk README COPYRIGHT
recursive-include debian changelog packages.in