thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Partridge, Lucas (GE Aviation)" <Lucas.Partri...@ge.com>
Subject RE: Can't create a Python egg for Thrift 0.9.3 on Windows 7
Date Thu, 16 Jun 2016 12:50:30 GMT
FYI Replacing lines 32-34 originally put in as part of "THRIFT-2620: Fix python packaging"
in v0.9.2: https://github.com/apache/thrift/commit/750df2ec4c039e504673af2449fa2996138ef767
appeared to fix this as far as I can tell.

i.e., replacing:

import os
del os.link

with:

import os
if 'vagrant' in str(os.environ):
    del os.link

...seems to result in a valid egg when 'python setup.py install' is run. Hmm, I don't understand
why my copy of thrift-0.9.3\lib\py\setup.py unzipped from thrift-0.9.3.tar.gz doesn't match
https://github.com/apache/thrift/blob/0.9.3/lib/py/setup.py#L33?!

Thanks, Lucas.

-----Original Message-----
From: Partridge, Lucas (GE Aviation) 
Sent: 16 June 2016 11:11
To: user@thrift.apache.org
Subject: EXT: Can't create a Python egg for Thrift 0.9.3 on Windows 7

Hi,
I would like to build the Python egg for Thrift 0.9.3 as easily as possible on my Windows
7 laptop.

If I download thrift-0.9.3.tar.gz, unzip it and cd into thrift-0.9.3\lib\py and run the setup
I get:

C:\Tools\thrift\0.9.3\thrift-0.9.3\lib\py>python setup.py install Traceback (most recent
call last):
  File "setup.py", line 36, in <module>
    del os.link
AttributeError: link

I'm using Python 2.7.11 :: Anaconda 2.5.0 (64-bit).

As I've written this I've discovered os.link doesn't exist in Python 2 (https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.python.org_2_library_os.html&d=CwIFAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=c1CCNND4PG-Q_V2AJWDWrugZAXQ8Y3EE_f_mAHcpXcs&m=vkT-zjkdXFd6TGOssHpVglveQipv78vhNOCEcTHs2ak&s=42etaFCbUIuZz6sWnngcPQv3f_qagop-7Tt1-J1bs2Y&e=
) but it does in Python 3: https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.python.org_3_library_os.html-23os.link&d=CwIFAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=c1CCNND4PG-Q_V2AJWDWrugZAXQ8Y3EE_f_mAHcpXcs&m=vkT-zjkdXFd6TGOssHpVglveQipv78vhNOCEcTHs2ak&s=pKsQn-V7xuaYrF5jTQc1zksuiaeuMGUb9a5ZB5DAJ7Q&e=
.

So am I obliged to use Python 3 to create the Thrift egg now; or is there an easy way to do
it for Python 2 users?  I never got this error when I made the egg for thrift 0.9.1 but I
notice the setup.py file for that version of Thrift doesn't use 'os' at all.

Thanks, Lucas.

Mime
View raw message