Skip to content

Commit 80bebf7

Browse files
committed
Avoid error message about version.py when cleaning
1 parent 9e9af14 commit 80bebf7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

2929
from setuptools import setup, find_packages
30+
import sys
3031

3132
# Parse version file to extract __version__ value
3233
bifrost_version_file = 'bifrost/version.py'
@@ -41,6 +42,8 @@
4142
__version__ = ''.join([c for c in __version__
4243
if c.isalnum() or c in ".-_"])
4344
except IOError:
45+
if 'clean' in sys.argv[1:]:
46+
sys.exit(0)
4447
print "*************************************************************************"
4548
print "Please run `make` from the root of the source tree to generate version.py"
4649
print "*************************************************************************"

0 commit comments

Comments
 (0)