Anonymous avatar Anonymous committed 1439fc6

Added 2to3 build support - now installs on Python 3
Removed default import of into
Fixed division operator issue in

Comments (0)

Files changed (4)

-* Placeholder
+* Removed default import of into
+* Fixed division operator issue in


 with Mark Hammond's pywin32 library, but avoids the use of extension
 modules by utilizing ctypes.
-__all__ = ('net')
-import net


+from __future__ import division
 import ctypes
 from ctypes import wintypes
 from import handle_nonzero_success
 		('path_buffer', ctypes.c_byte*1),
 	def get_print_name(self):
-		arr_typ = wintypes.WCHAR*(self.print_name_length/wchar_size)
+		arr_typ = wintypes.WCHAR*(self.print_name_length//wchar_size)
 		data = ctypes.byref(self.path_buffer, self.print_name_offset)
 		return ctypes.cast(data, ctypes.POINTER(arr_typ)).contents.value
 	def get_substitute_name(self):
-		arr_typ = wintypes.WCHAR*(self.substitute_name_length/wchar_size)
+		arr_typ = wintypes.WCHAR*(self.substitute_name_length//wchar_size)
 		data = ctypes.byref(self.path_buffer, self.substitute_name_offset)
 		return ctypes.cast(data, ctypes.POINTER(arr_typ)).contents.value
 __svnauthor__ = '$Author$'[9:-2]
 __date__ = '$Date$'[7:-2]
+	from distutils.command.build_py import build_py_2to3 as build_py
+	# exclude some fixers that break already compatible code
+	from lib2to3.refactor import get_fixers_from_package
+	fixers = get_fixers_from_package('lib2to3.fixes')
+	for skip_fixer in ['import']:
+		fixers.remove('lib2to3.fixes.fix_' + skip_fixer)
+	build_py.fixer_names = fixers
+except ImportError:
+	from distutils.command.build_py import build_py
 name = ''
 setup (name = name,
 		test_suite = "nose.collector",
+		cmdclass=dict(build_py=build_py),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.