port the makefile to Windows and update the README

This commit is contained in:
Zooko O'Whielacronx 2007-04-04 11:18:38 -07:00
parent 79b5e50c26
commit 01502ce665
2 changed files with 33 additions and 12 deletions

View File

@ -1,26 +1,40 @@
default: build
BASE=$(shell pwd)
PYTHON=python
INSTDIR=$(BASE)/instdir
INSTDIR=$(BASE)/instdir/lib/python$(shell $(PYTHON) -c 'import sys;print sys.version_info[0]').$(shell $(PYTHON) -c 'import sys;print sys.version_info[1]')/site-packages
UNAME=$(shell uname)
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
EXTRA_SETUP_ARGS=build -c mingw32
PATHDIR := $(shell cygpath -m $(INSTDIR))
INSTDIR := $(shell cygpath -w $(INSTDIR))
TRIAL=$(PYTHON) `cygpath -m \`type -p trial\` `
ifneq ($(PYTHONPATH),)
PYTHONPATH := $(shell cygpath -m $(PYTHONPATH))
endif
else
EXTRA_SETUP_ARGS=
PATHDIR := $(INSTDIR)
TRIAL=trial
endif
show-instdir:
@echo $(INSTDIR)
PATHSEP=$(shell python -c 'import os; print os.pathsep')
ifneq ($(PYTHONPATH),)
PP=PYTHONPATH=${PYTHONPATH}:$(INSTDIR)
PP=PYTHONPATH=$(PYTHONPATH)$(PATHSEP)$(PATHDIR)
else
PP=PYTHONPATH=$(INSTDIR)
PP=PYTHONPATH=$(PATHDIR)
endif
.PHONY: build
build: build-pyfec build-Crypto
$(PYTHON) setup.py install --prefix=$(BASE)/instdir
$(PYTHON) setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
build-pyfec:
cd src/pyfec && $(PYTHON) ./setup.py install --prefix=$(BASE)/instdir
cd src/pyfec && $(PYTHON) ./setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
test-pyfec:
$(PP) $(PYTHON) src/pyfec/fec/test/test_pyfec.py
@ -30,7 +44,7 @@ clean-pyfec:
build-Crypto:
cd src/Crypto && $(PYTHON) ./setup.py install --prefix=$(BASE)/instdir
cd src/Crypto && $(PYTHON) ./setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
clean-Crypto:
cd src/Crypto && python ./setup.py clean
@ -50,7 +64,6 @@ run-client3:
cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac
TRIAL=trial
TEST=allmydata
REPORTER=

16
README
View File

@ -31,10 +31,16 @@ DEPENDENCIES:
PyOpenSSL (0.6 or later)
http://pyopenssl.sourceforge.net
a C compiler (if building on Windows, cygwin gcc with mingw32 support)
http://gcc.gnu.org/
http://www.cygwin.com/
GNU make
BUILDING:
Just type 'make'. If the desired version of 'python' is not already on your
$PATH, then type 'make PYTHON=/path/to/your/preferred/python'.
Just type 'make'. This works on Windows too, provided that you have the
dependencies mentioned above. If the desired version of 'python' is not
already on your PATH, then type 'make PYTHON=/path/to/your/preferred/python'.
'make test' runs the unit test suite.
@ -43,8 +49,10 @@ BUILDING:
RUNNING:
The installed package creates an 'allmydata-tahoe' executable, usually in
/usr/bin . This tool is used to create, start, and stop nodes.
If you installed one of the debian packages constructed by "make deb-*" then
it creates an 'allmydata-tahoe' executable, usually in /usr/bin . If you
didn't install a package you can find allmydata-tahoe in instdir/scripts.
This tool is used to create, start, and stop nodes.
Somewhere in your mesh there must be a central 'queen' node. This is
constructed by running 'allmydata-tahoe create-queen --basedir WHERE'. Once