Skip to content

Commit

Permalink
Reference dev version of webassets in setup.py.
Browse files Browse the repository at this point in the history
Releases will reference the release.
  • Loading branch information
miracle2k committed Mar 11, 2012
1 parent 8c7fc94 commit 2fba71b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
35 changes: 18 additions & 17 deletions setup.py
Expand Up @@ -13,26 +13,27 @@
# Figure out the version; this could be done by importing the
# module, though that requires dependencies to be already installed,
# which may not be the case when processing a pip requirements
# file, for example.a
import os, re
here = os.path.dirname(os.path.abspath(__file__))
version_re = re.compile(
r'__version__ = (\(.*?\))')
fp = open(os.path.join(here, 'src', 'flask_assets.py'))
version = None
for line in fp:
match = version_re.search(line)
if match:
version = eval(match.group(1))
break
else:
raise Exception("cannot find version")
fp.close()
# file, for example.
def parse_version(asignee):
import os, re
here = os.path.dirname(os.path.abspath(__file__))
version_re = re.compile(
r'__version__ = (\(.*?\))')
with open(os.path.join(here, 'src', 'flask_assets.py')) as fp:
for line in fp:
match = version_re.search(line)
if match:
version = eval(match.group(1))
return ".".join(map(str, version))
else:
raise Exception("cannot find version")
version = parse_version('__version__')
webassets_version = parse_version('__webassets_version__')


setup(
name='Flask-Assets',
version=".".join(map(str, version)),
version=version,
url='http://github.com/miracle2k/flask-assets',
license='BSD',
author='Michael Elsdoerfer',
Expand All @@ -46,7 +47,7 @@
platforms='any',
install_requires=[
'Flask>=0.8',
'webassets==0.6',
'webassets==%s' % webassets_version,
],
classifiers=[
'Environment :: Web Environment',
Expand Down
2 changes: 2 additions & 0 deletions src/flask_assets.py
Expand Up @@ -5,6 +5,8 @@


__version__ = (0, 7, 'dev')
__webassets_version__ = ('dev',) # webassets core compatibility. used in setup.py


__all__ = ('Environment', 'Bundle',)

Expand Down

0 comments on commit 2fba71b

Please sign in to comment.