From 750df2ec4c039e504673af2449fa2996138ef767 Mon Sep 17 00:00:00 2001 From: jfarrell Date: Thu, 10 Jul 2014 09:18:42 -0400 Subject: [PATCH] THRIFT-2620: Fix python packaging Client: build process Patch: jfarrell Fixes python build to include missing README.md and also run packaging under vagrant images --- .gitignore | 3 +-- lib/py/setup.cfg | 2 ++ lib/py/setup.py | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 02316f3e..f4a4b657 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.log *.trs *.suo +*.pyc *.cache *.user *.ipch @@ -210,8 +211,6 @@ test-driver /test/log/ /test/test.log /test/py.twisted/_trial_temp/ -/test/py.twisted/test_suite.pyc -/test/py.tornado/*.pyc /test/rb/Gemfile.lock /tutorial/cpp/TutorialClient /tutorial/cpp/TutorialServer diff --git a/lib/py/setup.cfg b/lib/py/setup.cfg index 2dca2f87..c6dab40d 100644 --- a/lib/py/setup.cfg +++ b/lib/py/setup.cfg @@ -1,2 +1,4 @@ [install] optimize = 1 +[metadata] +description-file = README.md diff --git a/lib/py/setup.py b/lib/py/setup.py index 76a35260..bd177b33 100644 --- a/lib/py/setup.py +++ b/lib/py/setup.py @@ -28,6 +28,11 @@ except: from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError +# Fix to build sdist under vagrant +import os +if 'vagrant' in str(os.environ): + del os.link + include_dirs = [] if sys.platform == 'win32': include_dirs.append('compat/win32') -- 2.17.1