diff options
Diffstat (limited to 'dev-python/django-pipeline')
-rw-r--r-- | dev-python/django-pipeline/Manifest | 2 | ||||
-rw-r--r-- | dev-python/django-pipeline/django-pipeline-1.3.25.ebuild | 51 | ||||
-rw-r--r-- | dev-python/django-pipeline/django-pipeline-1.3.26.ebuild | 55 | ||||
-rw-r--r-- | dev-python/django-pipeline/files/1.3.26-tests.patch | 64 | ||||
-rw-r--r-- | dev-python/django-pipeline/metadata.xml | 8 |
5 files changed, 180 insertions, 0 deletions
diff --git a/dev-python/django-pipeline/Manifest b/dev-python/django-pipeline/Manifest new file mode 100644 index 000000000000..1886b93e2b9d --- /dev/null +++ b/dev-python/django-pipeline/Manifest @@ -0,0 +1,2 @@ +DIST django-pipeline-1.3.25.tar.gz 41008 SHA256 92c4ba5543d3ad980cd3a65a121ced62a6ad6449a773269a693f54e0ca5c565f SHA512 2c66b8b60076a8d19049947a9465d96fd80098c6e560f6cb6ffa26fd17d267830d87913041f9876da1276b0224ef3e8b0183c56367741e11c0f010a236b87169 WHIRLPOOL 15ac71f71988b2c7f5bb2d7c322843c35f6e34532af526b72bc90c15458b512948b97af333aaa5d52f71fd785f70d9b04018f8337eefc037be2dd24f04c77d7f +DIST django-pipeline-1.3.26.tar.gz 41054 SHA256 58433fc07cc81f213686b892caeb8d17d6ed4e00444ef95b35f21a5a3cc6357e SHA512 106c89e6a5509305548f6169f9b38d3a288bdf260c4b933ac1372c8471e897b8f6109cdecf70a4f77dff670e2b97abe4ed990903abfc188a59600189d0473284 WHIRLPOOL 7ead1f6dbc6df1a5c4b26869e6b4ae73cd416ed52f22ba1ff16b57a295f476c7973a56af9c05d1b50097e82dcd286207f648920b3acadd88fc40ad26aae10285 diff --git a/dev-python/django-pipeline/django-pipeline-1.3.25.ebuild b/dev-python/django-pipeline/django-pipeline-1.3.25.ebuild new file mode 100644 index 000000000000..ff473614b8b6 --- /dev/null +++ b/dev-python/django-pipeline/django-pipeline-1.3.25.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +inherit distutils-r1 + +DESCRIPTION="An asset packaging library for Django" +HOMEPAGE="http://pypi.python.org/pypi/django-pipeline/ https://github.com/cyberdelia/django-pipeline" + +# PyPi releases lack docs/ subdir: +# https://github.com/cyberdelia/django-pipeline/pull/254 +SRC_URI="https://github.com/cyberdelia/django-pipeline/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc test" + +RDEPEND=">=dev-python/django-1.5.8[${PYTHON_USEDEP}] + dev-python/jsmin[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] )" +# As usual for test phase +DISTUTILS_IN_SOURCE_BUILD=1 + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + PYTHONPATH=. django-admin.py test --settings=tests.settings tests \ + || die "Tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} + +python_install() { + export PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor' + distutils-r1_python_install +} diff --git a/dev-python/django-pipeline/django-pipeline-1.3.26.ebuild b/dev-python/django-pipeline/django-pipeline-1.3.26.ebuild new file mode 100644 index 000000000000..d9ab3154478a --- /dev/null +++ b/dev-python/django-pipeline/django-pipeline-1.3.26.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) + +inherit distutils-r1 + +DESCRIPTION="An asset packaging library for Django" +HOMEPAGE="http://pypi.python.org/pypi/django-pipeline/ https://github.com/cyberdelia/django-pipeline" + +# PyPi releases lack docs/ subdir: +# https://github.com/cyberdelia/django-pipeline/pull/254 +SRC_URI="https://github.com/cyberdelia/django-pipeline/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="doc test" + +RDEPEND=">=dev-python/django-1.5.8[${PYTHON_USEDEP}] + dev-python/jsmin[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}]" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( ${RDEPEND} + dev-python/mock[${PYTHON_USEDEP}] )" + +PATCHES=( "${FILESDIR}"/${PV}-tests.patch ) + +# As usual for test phase +DISTUTILS_IN_SOURCE_BUILD=1 + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + # https://github.com/cyberdelia/django-pipeline/issues/381 + PYTHONPATH=. django-admin.py test --settings=tests.settings tests \ + || die "Tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} + +python_install() { + export PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor' + distutils-r1_python_install +} diff --git a/dev-python/django-pipeline/files/1.3.26-tests.patch b/dev-python/django-pipeline/files/1.3.26-tests.patch new file mode 100644 index 000000000000..5cdf5e760c96 --- /dev/null +++ b/dev-python/django-pipeline/files/1.3.26-tests.patch @@ -0,0 +1,64 @@ +https://github.com/cyberdelia/django-pipeline/commit/ba7b8d0d1cb621521a2025fed3e60786a010836d +diff --git a/docs/configuration.rst b/docs/configuration.rst +index 4385e23..e200bc3 100644 +--- a/docs/configuration.rst ++++ b/docs/configuration.rst +@@ -185,7 +185,7 @@ Other settings + ( + (b'text/coffeescript', '.coffee'), + (b'text/less', '.less'), +- (b'application/javascript', '.js'), ++ (b'text/javascript', '.js'), + (b'text/x-sass', '.sass'), + (b'text/x-scss', '.scss') + ) +diff --git a/tests/tests/test_template.py b/tests/tests/test_template.py +index 84b6957..a303d03 100644 +--- a/tests/tests/test_template.py ++++ b/tests/tests/test_template.py +@@ -35,19 +35,19 @@ def test_package_css_disabled(self): + + def test_package_js(self): + template = self.env.from_string(u"""{% compressed_js "scripts" %}""") +- self.assertEqual(u'<script type="application/javascript" src="/static/scripts.js" charset="utf-8"></script>', template.render()) ++ self.assertEqual(u'<script type="text/javascript" src="/static/scripts.js" charset="utf-8"></script>', template.render()) + + def test_package_js_async(self): + template = self.env.from_string(u"""{% compressed_js "scripts_async" %}""") +- self.assertEqual(u'<script async type="application/javascript" src="/static/scripts_async.js" charset="utf-8"></script>', template.render()) ++ self.assertEqual(u'<script async type="text/javascript" src="/static/scripts_async.js" charset="utf-8"></script>', template.render()) + + def test_package_js_defer(self): + template = self.env.from_string(u"""{% compressed_js "scripts_defer" %}""") +- self.assertEqual(u'<script defer type="application/javascript" src="/static/scripts_defer.js" charset="utf-8"></script>', template.render()) ++ self.assertEqual(u'<script defer type="text/javascript" src="/static/scripts_defer.js" charset="utf-8"></script>', template.render()) + + def test_package_js_async_defer(self): + template = self.env.from_string(u"""{% compressed_js "scripts_async_defer" %}""") +- self.assertEqual(u'<script async defer type="application/javascript" src="/static/scripts_async_defer.js" charset="utf-8"></script>', template.render()) ++ self.assertEqual(u'<script async defer type="text/javascript" src="/static/scripts_async_defer.js" charset="utf-8"></script>', template.render()) + + + class DjangoTest(TestCase): +@@ -64,16 +64,16 @@ def test_compressed_css(self): + + def test_compressed_js(self): + rendered = self.render_template(u"""{% load compressed %}{% compressed_js "scripts" %}""") +- self.assertEqual(u'<script type="application/javascript" src="/static/scripts.js" charset="utf-8"></script>', rendered) ++ self.assertEqual(u'<script type="text/javascript" src="/static/scripts.js" charset="utf-8"></script>', rendered) + + def test_compressed_js_async(self): + rendered = self.render_template(u"""{% load compressed %}{% compressed_js "scripts_async" %}""") +- self.assertEqual(u'<script async type="application/javascript" src="/static/scripts_async.js" charset="utf-8"></script>', rendered) ++ self.assertEqual(u'<script async type="text/javascript" src="/static/scripts_async.js" charset="utf-8"></script>', rendered) + + def test_compressed_js_defer(self): + rendered = self.render_template(u"""{% load compressed %}{% compressed_js "scripts_defer" %}""") +- self.assertEqual(u'<script defer type="application/javascript" src="/static/scripts_defer.js" charset="utf-8"></script>', rendered) ++ self.assertEqual(u'<script defer type="text/javascript" src="/static/scripts_defer.js" charset="utf-8"></script>', rendered) + + def test_compressed_js_async_defer(self): + rendered = self.render_template(u"""{% load compressed %}{% compressed_js "scripts_async_defer" %}""") +- self.assertEqual(u'<script async defer type="application/javascript" src="/static/scripts_async_defer.js" charset="utf-8"></script>', rendered) ++ self.assertEqual(u'<script async defer type="text/javascript" src="/static/scripts_async_defer.js" charset="utf-8"></script>', rendered) + diff --git a/dev-python/django-pipeline/metadata.xml b/dev-python/django-pipeline/metadata.xml new file mode 100644 index 000000000000..14c10d6cf43f --- /dev/null +++ b/dev-python/django-pipeline/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <upstream> + <remote-id type="github">cyberdelia/django-pipeline</remote-id> + </upstream> +</pkgmetadata> |