Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to new pypi version with python3 stuffs

  • Loading branch information...
commit a6a1f536ab5875b974b624f16349e2f8a87dafc7 1 parent 6e0bf00
Brent Pedersen - Bioinformatics authored
Showing with 15 additions and 10 deletions.
  1. +1 −0  MANIFEST.in
  2. +4 −0 NEWS.txt
  3. +1 −1  setup.py
  4. +9 −9 toolshed/optimize.py
1  MANIFEST.in
View
@@ -1,2 +1,3 @@
include README.rst
include NEWS.txt
+include ez_setup.py
4 NEWS.txt
View
@@ -1,5 +1,9 @@
News
====
+0.3.3
+-----
+python 3 compatible
+
0.3.2
-----
add skip_while kwarg to reader(). takes a function that accepts a list
2  setup.py
View
@@ -9,7 +9,7 @@
NEWS = open(os.path.join(here, 'NEWS.txt')).read()
-version = '0.3.2'
+version = '0.3.3'
install_requires = [
'nose',
18 toolshed/optimize.py
View
@@ -15,7 +15,7 @@ def adder(a, b):
return a + b
- print adder(6, 8)
+ print(adder(6, 8))
note the decorator is called with example invocations so that
shedskin can infer types. After the first invocation, the extension
@@ -72,23 +72,23 @@ def __call__(self, fn):
tmp = open(self._tmp(source_hash), "w")
for mod in self.modules:
if hasattr(mod, "__module__"):
- print >> tmp, 'from %s import %s' % (mod.__module__,mod.__name__)
+ tmp.write('from %s import %s\n' % (mod.__module__,mod.__name__))
continue
elif hasattr(mod, "__name__"):
mod = mod.__name__
- print >> tmp, 'import %s' % mod
+ tmp.write('import %s\n' % mod)
for other_fn in self.functions:
- print >> tmp, self._get_function_source(other_fn)
+ tmp.write(self._get_function_source(other_fn) + '\n')
# hack to get the function source without the decorator line...
# needs to be fixed...
if src[0] == "@":
- print >> tmp, src.split('\n', 1)[1]
+ tmp.write(src.split('\n', 1)[1] + '\n')
else:
- print >> tmp, src
+ tmp.write(src + '\n')
for i in self.invocations:
- print >>tmp, "%s%s" % (fn.func_name, str(i))
+ tmp.write("%s%s\n" % (fn.func_name, str(i)))
tmp.close()
makefile = getgx().makefile_name = "Makefile_%s" % source_hash
@@ -112,8 +112,8 @@ def _run_shedskin(self, name, makefile):
log.close()
sys.stdout = old
if ret != 0:
- print >>sys.stderr, "error making %s" % makefile
- print open(log.name).read()
+ sys.stderr.write("error making %s\n" % makefile)
+ print(open(log.name).read())
def _get_module(self, name):
if name.endswith(".py"):
Please sign in to comment.
Something went wrong with that request. Please try again.