Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch to new extension import mechanism.

  • Loading branch information...
commit 38e4ef091620b9c35c984d3a7f98b4430749f2f2 1 parent 6a1a73b
@miracle2k authored
View
6 CHANGES
@@ -1,3 +1,9 @@
+Development version (?)
+ - Now officially requires at least Flask 0.8, so it can use the new
+ extension import system, but using the compatibility module, older
+ Flask versions should work fine as well:
+ http://flask.pocoo.org/docs/extensions/
+
0.6.2 (2011-10-12)
- Fixed Blueprint/Module resolving in output path.
View
3  TODO
@@ -5,3 +5,6 @@ attempting something like g.assets_env.register().
Using loaders is currently somewhat verbose, it'd be more micro-framework-like
if we could say "assets_env.load('yaml', ...)".
+
+Now that we officially require Flask 0.8, and are no longer testing
+older versions, remove the support code for those older versions.
View
6 docs/index.rst
@@ -1,7 +1,7 @@
Flask-Assets
============
-.. module:: flaskext.assets
+.. module:: flask_assets
Flask-Assets helps you to integrate `webassets`_ into your `Flask`_
application.
@@ -31,7 +31,7 @@ registering your assets with it in the form of so called *bundles*.
.. code-block:: python
from flask import Flask
- from flaskext.assets import Environment, Bundle
+ from flask.ext.assets import Environment, Bundle
app = Flask(__name__)
assets = Environment(app)
@@ -59,7 +59,7 @@ rather than passing a fixed application object:
.. code-block:: python
app = Flask(__name__)
- assets = flaskext.assets.Environment()
+ assets = flask.ext.assets.Environment()
assets.init_app(app)
View
2  example/app.py
@@ -4,7 +4,7 @@
sys.path.insert(0, path.join(path.dirname(__file__), '../src'))
from flask import Flask, render_template, url_for
-from flaskext.assets import Environment, Bundle
+from flask.ext.assets import Environment, Bundle
app = Flask(__name__)
View
5 setup.py
@@ -18,7 +18,7 @@
here = os.path.dirname(os.path.abspath(__file__))
version_re = re.compile(
r'__version__ = (\(.*?\))')
-fp = open(os.path.join(here, 'src/flaskext', 'assets.py'))
+fp = open(os.path.join(here, 'src', 'flask_assets.py'))
version = None
for line in fp:
match = version_re.search(line)
@@ -42,11 +42,10 @@
long_description=__doc__,
packages=find_packages('src'),
package_dir={'': 'src'},
- namespace_packages=['flaskext'],
zip_safe=False,
platforms='any',
install_requires=[
- 'Flask>=0.6',
+ 'Flask>=0.8',
'webassets==0.6',
],
classifiers=[
View
0  src/flaskext/assets.py → src/flask_assets.py
File renamed without changes
View
11 src/flaskext/__init__.py
@@ -1,11 +0,0 @@
-try:
- __import__('pkg_resources').declare_namespace(__name__)
-except ImportError:
- raise ImportError(
- '''Flask extensions require pkg_resources.py, usually provided by
- setuptools. If setuptools is unavailable on your system
- (e.g. you're running on Google App Engine), you can obtain a copy
- from http://svn.python.org/projects/sandbox/trunk/setuptools/
- and place it somewhere on your Python path (e.g. alongside your
- main module).'''
- )
View
2  tests/helpers.py
@@ -6,7 +6,7 @@
except ImportError:
FLASK_VERSION = '0.6'
from webassets.test import TempEnvironmentHelper as BaseTempEnvironmentHelper
-from flaskext.assets import Environment
+from flask.ext.assets import Environment
try:
from flask import Blueprint
View
2  tests/test_config.py
@@ -5,7 +5,7 @@
from nose.tools import assert_raises
from flask import Flask
-from flaskext.assets import Environment
+from flask.ext.assets import Environment
try:
from webassets.updater import BaseUpdater
except ImportError:
View
2  tests/test_env.py
@@ -1,6 +1,6 @@
from nose.tools import assert_raises
from flask import Flask
-from flaskext.assets import Environment
+from flask.ext.assets import Environment
class TestEnv:
View
2  tests/test_integration.py
@@ -2,7 +2,7 @@
from nose.tools import assert_raises
from flask import Flask
-from flaskext.assets import Environment, Bundle
+from flask.ext.assets import Environment, Bundle
from webassets.bundle import get_all_bundle_files
from helpers import TempEnvironmentHelper, Module, Blueprint
View
2  tests/test_script.py
@@ -3,7 +3,7 @@
import sys
from nose import SkipTest
from flask import Flask
-from flaskext.assets import Environment, ManageAssets
+from flask.ext.assets import Environment, ManageAssets
try:
from flaskext.script import Manager
View
48 tox.ini
@@ -9,22 +9,6 @@ deps =
flask-script==0.3.1
webassets==0.6
-[testenv:py27_flask07]
-basepython = python2.7
-deps =
- nose==1.0.0
- flask==0.7
- flask-script==0.3.1
- webassets==0.6
-
-[testenv:py27_flask06]
-basepython = python2.7
-deps =
- nose==1.0.0
- flask==0.6
- flask-script==0.3.1
- webassets==0.6
-
[testenv:py26_flask08]
basepython = python2.6
deps =
@@ -33,22 +17,6 @@ deps =
flask-script==0.3.1
webassets==0.6
-[testenv:py26_flask07]
-basepython = python2.6
-deps =
- nose==1.0.0
- flask==0.7
- flask-script==0.3.1
- webassets==0.6
-
-[testenv:py26_flask06]
-basepython = python2.6
-deps =
- nose==1.0.0
- flask==0.6
- flask-script==0.3.1
- webassets==0.6
-
[testenv:py25_flask08]
basepython = python2.5
deps =
@@ -57,22 +25,6 @@ deps =
flask-script==0.3.1
webassets==0.6
-[testenv:py25_flask07]
-basepython = python2.5
-deps =
- nose==1.0.0
- flask==0.7.2
- flask-script==0.3.1
- webassets==0.6
-
-[testenv:py25_flask06]
-basepython = python2.5
-deps =
- nose==1.0.0
- flask==0.6
- flask-script==0.3.1
- webassets==0.6
-
[testenv:pypy_flask08]
basepython = pypy
deps =
Please sign in to comment.
Something went wrong with that request. Please try again.