[pypy-svn] rev 1371 - pypy/trunk/doc/funding
tismer at codespeak.net
tismer at codespeak.net
Sat Sep 20 15:46:21 CEST 2003
Author: tismer
Date: Sat Sep 20 15:46:21 2003
New Revision: 1371
Added:
pypy/trunk/doc/funding/B6.wp11_small_os.txt
- copied unchanged from rev 1365, pypy/trunk/doc/funding/B6.wp10_small_os.txt
pypy/trunk/doc/funding/renamewp.py
Removed:
pypy/trunk/doc/funding/B6.wp10_small_os.txt
Modified:
pypy/trunk/doc/funding/B6.1_plan_introduction.txt
pypy/trunk/doc/funding/crossreferences.asc
pypy/trunk/doc/funding/mkxref.py
Log:
renamed WP10 to WP11
Modified: pypy/trunk/doc/funding/B6.1_plan_introduction.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.1_plan_introduction.txt (original)
+++ pypy/trunk/doc/funding/B6.1_plan_introduction.txt Sat Sep 20 15:46:21 2003
@@ -253,7 +253,7 @@
the target platform.
-WP10_: A small Operating System for an Embedded Device
+WP11_: A small Operating System for an Embedded Device
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*we are thinking of a printer here, but don't have facts yet*
Deleted: /pypy/trunk/doc/funding/B6.wp10_small_os.txt
==============================================================================
--- /pypy/trunk/doc/funding/B6.wp10_small_os.txt Sat Sep 20 15:46:21 2003
+++ (empty file)
@@ -1,58 +0,0 @@
-.. include:: crossreferences.asc
-
-Workpackage Description
-========================
-
-================================ ==========================
-**Workpackage number** 10
--------------------------------- --------------------------
-**Start date or starting event** not before WP05_
-================================ ==========================
-
-================================= ======= ======= ======= ======= ======= ======= ======= =======
-**Participant id** X Y Z
---------------------------------- ------- ------- ------- ------- ------- ------- ------- -------
-**Person-months per participant** 2 2 2
-================================= ======= ======= ======= ======= ======= ======= ======= =======
-
-
-**Objectives**
-
-Title: A small Operating System for an Embedded Device
-
-XXX the following is still WP09, write it!!!
-
-- Supporting a completely different platform
-- Providing an efficient, high-level Language for
- embedded Devices
-- Proving the flexibility of the PyPy idea
-
-
-**Description of work**
-
-- Analyse the differences between the new architecture and
- PyPy's current. Deside whether to optimize for code size
- or applicatin speed.
-
-- Develop the translation process, run-time and those optimisations
- that depend on low-level details.
-
-- Implement a simulator for the embedded device.
-
-- Implement interfaces to the needed external libraries.
-
-- Combine different solutions for the different issues discussed in
- High-performance (WP06_, WP07_, WP08_).
- Gather statistics with real-work Python applications.
- Compare the results. This is where the flexibility of the whole
- project is vital. Typically, very different trade-offs need to be
- made on different environments.
-
-
-**Deliverables**
-
-- DL??? Python running on the embedded device.
-- DL??? Passing all applicable elements of the standard test suite.
-
-**Milestones and Expected Result**
-
Modified: pypy/trunk/doc/funding/crossreferences.asc
==============================================================================
--- pypy/trunk/doc/funding/crossreferences.asc (original)
+++ pypy/trunk/doc/funding/crossreferences.asc Sat Sep 20 15:46:21 2003
@@ -7,4 +7,4 @@
.. _WP07: B6.wp07_translator_optimisations.html
.. _WP08: B6.wp08_integrate_technology.html
.. _WP09: B6.wp09_embedded_device.html
-.. _WP10: B6.wp10_small_os.html
+.. _WP11: B6.wp11_small_os.html
Modified: pypy/trunk/doc/funding/mkxref.py
==============================================================================
--- pypy/trunk/doc/funding/mkxref.py (original)
+++ pypy/trunk/doc/funding/mkxref.py Sat Sep 20 15:46:21 2003
@@ -11,7 +11,7 @@
START_STR = "B6.wp".lower()
-def get_wps_from_dir():
+def get_wps_from_dir(as_html=False):
res = {}
for fname in os.listdir("."):
flow = fname.lower()
@@ -19,8 +19,12 @@
if flow.startswith(START_STR) and ext == ".txt":
num = flow[len(START_STR):].split("_", 1)[0]
if len(num)==2 and num.isdigit():
- pre, ext = os.path.splitext(fname)
- res["WP"+num] = pre + ".html"
+ if as_html:
+ pre, ext = os.path.splitext(fname)
+ newfname = pre + ".html"
+ else:
+ newfname = fname
+ res["WP"+num] = newfname
return res
REF_FILE = "B6.1_plan_introduction.txt"
@@ -65,7 +69,7 @@
def build_xref_file():
pre, old, post = split_xref_text()
wps = get_wps_from_file()
- wps.update(get_wps_from_dir())
+ wps.update(get_wps_from_dir(as_html=True))
wplist = wps.items()
wplist.sort()
mid = [ ".. _%s: %s\n" % (name, url) for name, url in wplist]
Added: pypy/trunk/doc/funding/renamewp.py
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/renamewp.py Sat Sep 20 15:46:21 2003
@@ -0,0 +1,55 @@
+# renaming a working package.
+usage = """usage:
+python renamewp.py old new
+where old and new are decimal WP numbers in the range 1-99.
+"""
+
+import os, sys, mkxref
+
+def do_rename(old, new):
+ oldS = "WP%02d" % old
+ newS = "WP%02d" % new
+ wpfiles = mkxref.get_wps_from_dir()
+ if wpfiles.has_key(oldS):
+ if wpfiles.has_key(newS):
+ raise ValueError, "cannot rename because %s is in the way!" % wpfiles[newS]
+ oldName = wpfiles[oldS]
+ p = len(mkxref.START_STR)
+ newName = "%s%02d%s" % (oldName[:p], new, oldName[p+2:])
+ cmd = 'svn move "%s" "%s"' % (oldName, newName)
+ print ">>>", cmd
+ err = os.system(cmd)
+ if err:
+ print "aborting due to the above error"
+ sys.exit(1)
+ del wpfiles[oldS]
+ wpfiles[newS] = newName
+ workfiles = wpfiles.values()
+ workfiles.append(mkxref.REF_FILE)
+ find = oldS+"_"
+ repl = newS+"_"
+ for fname in workfiles:
+ txt = file(fname).read()
+ if txt.find(find) >= 0:
+ print "rewriting %s" % fname
+ txt = txt.replace(find, repl)
+ file(fname, "w").write(txt)
+ print "re-creating cross references"
+ mkxref.build_xref_file()
+ print "done."
+
+
+def main():
+ args = sys.argv[1:]
+ try:
+ old, new = map(int, args)
+ if min(old, new) < 1 or max(old, new) > 99:
+ raise ValueError
+ except:
+ print usage
+ sys.exit(1)
+ do_rename(old, new)
+
+if __name__ == "__main__":
+ main()
+
\ No newline at end of file
More information about the Pypy-commit
mailing list