Permalink
Browse files

Added a source distribution build script

  • Loading branch information...
1 parent 91eea33 commit 5614f9db3ddc035b1a2dc8dcf596b7f83028a225 @mjs committed Jul 7, 2015
Showing with 25 additions and 0 deletions.
  1. +25 −0 build-sdist
View
@@ -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

0 comments on commit 5614f9d

Please sign in to comment.