xstatic-jquery package, initial commit

This commit is contained in:
Thomas Waldmann 2011-06-26 07:38:20 +02:00
commit 7b5173da0a
8 changed files with 9057 additions and 0 deletions

8
.hgignore Normal file
View File

@ -0,0 +1,8 @@
.*\.py[co]$
^dist/
^XStatic_jQuery.egg-info/
^MANIFEST$
.DS_Store
.orig$
.rej$
.~$

12
README.txt Normal file
View File

@ -0,0 +1,12 @@
XStatic-jQuery
--------------
jQuery javascript library packaged for setuptools (easy_install) / pip.
This package is intended to be used by **any** project that needs these files.
It intentionally does **not** provide any extra code **nor** has any extra requirements.
All we provide is the files and some metadata *strictly related* to these files.
You can find more info about the xstatic packaging way in the package `XStatic`.

27
setup.py Normal file
View File

@ -0,0 +1,27 @@
from setuptools import setup, find_packages
from xstatic.pkg.jquery import JQuery as xs
# The README.txt file should be written in reST so that PyPI can use
# it to generate your project's PyPI page.
long_description = open('README.txt').read()
setup( # better now, though not all of these make sense outside of setup.py
name='XStatic-' + xs.display_name,
version=xs.version,
description=xs.description,
long_description=long_description,
classifiers=xs.classifiers, # for pypi
keywords=xs.keywords, # for pypi
author=xs.author,
author_email=xs.author_email,
license=xs.license,
url=xs.homepage,
platforms=xs.platforms,
packages=find_packages(),
namespace_packages=['xstatic', 'xstatic.pkg', ],
include_package_data=True,
zip_safe=False,
install_requires=['XStatic'], # this is just a MINIMAL support code package
)

1
xstatic/__init__.py Normal file
View File

@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)

1
xstatic/pkg/__init__.py Normal file
View File

@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -0,0 +1,54 @@
"""
jQuery package (following xstatic standard)
"""
from os.path import join, dirname
from xstatic.main import XStatic
class JQuery(XStatic):
name = 'jquery' # short, all lowercase name
display_name = 'jQuery' # official name, upper/lowercase allowed
version = '1.6.1' # for simplicity, use same version as bundled files
base_dir = join(dirname(__file__), 'data')
# base_dir = '/usr/share/javascript/jquery'
description = "%s (xstatic packaging standard)" % display_name
platforms = 'any'
classifiers = []
keywords = '%s xstatic' % name
# this all refers to the XStatic-* package:
author = 'xstatic developers'
author_email = 'xstatic@example.org'
license = '(same a %s)' % display_name
homepage = 'http://xstatic.example.org/'
# XXX shall we have another bunch of entries for the bundled files?
# like upstream_author/homepage/download/...?
locations = {
# if value is a string, it is a base location, just append relative
# path/filename. if value is a dict, do another lookup using the
# relative path/filename you want.
# your relative path/filenames should usually be without version
# information, because either the base dir/url is exactly for this
# version or the mapping will care for accessing this version.
('google', 'http'): 'http://ajax.googleapis.com/ajax/libs/jquery/%s' % version,
('google', 'https'): 'https://ajax.googleapis.com/ajax/libs/jquery/%s' % version,
('jquery', 'http'): {
'jquery.js': 'http://code.jquery.com/jquery-%s.js' % version,
'jquery.min.js': 'http://code.jquery.com/jquery-%s.min.js' % version,
},
('microsoft', 'http'): {
'jquery.js': 'http://ajax.aspnetcdn.com/ajax/jquery/jquery-%s.js' % version,
'jquery.min.js': 'http://ajax.aspnetcdn.com/ajax/jquery/jquery-%s.min.js' % version,
},
('microsoft', 'https'): {
'jquery.js': 'https://ajax.aspnetcdn.com/ajax/jquery/jquery-%s.js' % version,
'jquery.min.js': 'https://ajax.aspnetcdn.com/ajax/jquery/jquery-%s.min.js' % version,
},
}

8936
xstatic/pkg/jquery/data/jquery.js vendored Normal file

File diff suppressed because it is too large Load Diff

18
xstatic/pkg/jquery/data/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long