Skip to content

Commit

Permalink
Added a source distribution build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Menno Smits committed Jul 7, 2015
1 parent 91eea33 commit 5614f9d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions 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

0 comments on commit 5614f9d

Please sign in to comment.