mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-2428: Python 3 setup.py support
Client: py Patch: Nathan Van Gheem Github Pull Request: This closes #89 ---- commit 89838fb1ff173eae6d81312e4e73e0ac2adc049d Author: Nathan Van Gheem <vangheem@gmail.com> Date: 2014-03-27T17:35:10Z python 3 support
This commit is contained in:
parent
bf0b6291f8
commit
1823b59ced
@ -42,13 +42,13 @@ class ve_build_ext(build_ext):
|
|||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
build_ext.run(self)
|
build_ext.run(self)
|
||||||
except DistutilsPlatformError, x:
|
except DistutilsPlatformError as x:
|
||||||
raise BuildFailed()
|
raise BuildFailed()
|
||||||
|
|
||||||
def build_extension(self, ext):
|
def build_extension(self, ext):
|
||||||
try:
|
try:
|
||||||
build_ext.build_extension(self, ext)
|
build_ext.build_extension(self, ext)
|
||||||
except ext_errors, x:
|
except ext_errors as x:
|
||||||
raise BuildFailed()
|
raise BuildFailed()
|
||||||
|
|
||||||
def run_setup(with_binary):
|
def run_setup(with_binary):
|
||||||
@ -88,17 +88,18 @@ def run_setup(with_binary):
|
|||||||
'Topic :: Software Development :: Libraries',
|
'Topic :: Software Development :: Libraries',
|
||||||
'Topic :: System :: Networking'
|
'Topic :: System :: Networking'
|
||||||
],
|
],
|
||||||
|
use_2to3 = True,
|
||||||
**extensions
|
**extensions
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run_setup(True)
|
run_setup(True)
|
||||||
except BuildFailed:
|
except BuildFailed:
|
||||||
print
|
print()
|
||||||
print '*' * 80
|
print('*' * 80)
|
||||||
print "An error occured while trying to compile with the C extension enabled"
|
print("An error occured while trying to compile with the C extension enabled")
|
||||||
print "Attempting to build without the extension now"
|
print("Attempting to build without the extension now")
|
||||||
print '*' * 80
|
print('*' * 80)
|
||||||
print
|
print()
|
||||||
|
|
||||||
run_setup(False)
|
run_setup(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user