summaryrefslogtreecommitdiff
path: root/convert-py3k
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-01-20 17:03:16 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-01-20 17:03:16 -0500
commitccdf8ea1343ddcd1c2dded7e2e91369ae35386b3 (patch)
treeb7b293b333416e5f0689ba7e875ce1c3c90b85cf /convert-py3k
parent8fcc92aa7aeef437fa87ddac1ee47fd9aab88972 (diff)
downloadbeautifulsoup4-ccdf8ea1343ddcd1c2dded7e2e91369ae35386b3.tar.gz
More script noodling.
Diffstat (limited to 'convert-py3k')
-rwxr-xr-xconvert-py3k16
1 files changed, 16 insertions, 0 deletions
diff --git a/convert-py3k b/convert-py3k
new file mode 100755
index 0000000..4f79051
--- /dev/null
+++ b/convert-py3k
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# The Python 2 source is the definitive source. This script uses 2to3-3.2 to
+# create a new python3/bs4 source tree that works under Python 3.
+#
+# See README.txt to see how to run the test suite after conversion.
+echo "About to destroy and rebuild the py3k/bs4 directory."
+echo "If you've got stuff in there, Ctrl-C out of this script or answer 'n'."
+mkdir -p py3k
+rm -rfI py3k/bs4
+cp -r bs4/ py3k/
+2to3-3.2 -w py3k
+echo ""
+echo "OK, conversion is done."
+echo "Now running the unit tests."
+(cd py3k && python3 -m unittest discover -s bs4) \ No newline at end of file