From 5614f9db3ddc035b1a2dc8dcf596b7f83028a225 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Tue, 7 Jul 2015 15:36:23 +1200 Subject: [PATCH] Added a source distribution build script To work around: https://bitbucket.org/pypa/setuptools/issue/141 --- build-sdist | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 build-sdist diff --git a/build-sdist b/build-sdist new file mode 100755 index 0000000..b883919 --- /dev/null +++ b/build-sdist @@ -0,0 +1,25 @@ +#!/bin/bash + +# This script builds the IMAPClient source distribution inside a +# virtualenv. +# +# This is needed to work around this issue with setuptools: +# https://bitbucket.org/pypa/setuptools/issue/141 +# +# In summary: if a different version of one of the "setup_requires" +# dependencies is globally installed, then setuptools will abort with +# a VersionConflict exception. Building in a virtualenv works around +# the bug. + +env=.build-env + +rm -rf $env +virtualenv $env + +. $env/bin/activate +python setup.py sdist --formats=zip --dist-dir . +deactivate + +rm -rf $env + +# TODO: validation of the source tarball