| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# This script builds the IMAPClient source distribution inside a |
| 4 |
# virtualenv. |
| 5 |
# |
| 6 |
# This is needed to work around this issue with setuptools: |
| 7 |
# https://bitbucket.org/pypa/setuptools/issue/141 |
| 8 |
# |
| 9 |
# In summary: if a different version of one of the "setup_requires" |
| 10 |
# dependencies is globally installed, then setuptools will abort with |
| 11 |
# a VersionConflict exception. Building in a virtualenv works around |
| 12 |
# the bug. |
| 13 |
|
| 14 |
env=.build-env |
| 15 |
|
| 16 |
rm -rf $env |
| 17 |
virtualenv $env |
| 18 |
|
| 19 |
. $env/bin/activate |
| 20 |
python setup.py sdist --formats=zip --dist-dir . |
| 21 |
deactivate |
| 22 |
|
| 23 |
rm -rf $env |
| 24 |
|
| 25 |
# TODO: validation of the source tarball |