Skip to content

Commit

Permalink
BLD: fix generated version.py in Bento build.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers committed May 4, 2013
1 parent eaae6d1 commit 247160a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bento.info
@@ -1,5 +1,5 @@
Name: scipy
Version: 0.10.0
Version: 0.13.0
Summary: SciPy: Scientific Library for Python
Url: http://www.scipy.org
DownloadUrl: http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531
Expand Down
29 changes: 24 additions & 5 deletions bscript
Expand Up @@ -23,6 +23,10 @@ from bento.commands import hooks
import waflib
from waflib import Options

# Importing setup.py needed to get version info
import setup


# FIXME: add this to numpy so that we can reuse it
class CTemplateTask(waflib.Task.Task):
color = 'BLUE'
Expand Down Expand Up @@ -184,6 +188,24 @@ def post_configure(context):

_generate_cython()


FULLVERSION, GIT_REVISION = setup.get_version_info()

version_file_content = """\
# THIS FILE IS GENERATED FROM SCIPY BSCRIPT
short_version = '%(version)s'
version = '%(version)s'
full_version = '%(full_version)s'
git_revision = '%(git_revision)s'
release = %(isrelease)s

if not release:
version = full_version
""" % {'version': setup.VERSION,
'full_version' : FULLVERSION,
'git_revision' : GIT_REVISION,
'isrelease': str(setup.ISRELEASED)}

@hooks.pre_build
def pre_build(context):
bld = context.waf_context
Expand All @@ -196,13 +218,10 @@ def show():
pass
""",
always=True)

bld(features="gen_pymodule",
target="scipy/version.py",
content="""\
version = '0.9.0'
short_version = version
is_released = True
""",
content=version_file_content,
always=True)

@hooks.options
Expand Down

0 comments on commit 247160a

Please sign in to comment.