%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif Name: python-djblets Version: 0.6.22 Release: 1%{?dist} Summary: A collection of useful classes and functions for Django Group: Applications/Internet # Djblets is MIT licensed: # http://code.google.com/p/reviewboard/wiki/Djblets # Jquery is bundled in Djblets. Jquery is dual-licensed MIT or GPLv2, hence # the package license is "MIT and (MIT or GPLv2)": # https://www.redhat.com/archives/fedora-legal-list/2009-May/msg00025.html License: MIT and (MIT or GPLv2) URL: http://www.review-board.org Source0: http://downloads.review-board.org/releases/Djblets/0.6/Djblets-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?fedora} > 17 Requires: python-django >= 1.1.1 %else Requires: Django >= 1.1.1 %endif Requires: python-imaging Patch0001: 0001-Conditionalize-ez_setup.patch %description A collection of useful classes and functions for Django %prep %setup -q -n Djblets-%{version} %patch0001 -p1 # Remove packaged egg-info so it's regenerated by setup.py rm -Rf Djblets*.egg-info %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --root $RPM_BUILD_ROOT # feedparser.py has a shebang, and has a runnable __main__; make it executable: chmod +x $RPM_BUILD_ROOT%{python_sitelib}/djblets/feedview/feedparser.py # Remove the "tests" subdirectory to avoid it polluting the main python # namespace: rm -rf $RPM_BUILD_ROOT%{python_sitelib}/tests %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc NEWS %{python_sitelib}/Djblets*.egg-info/ %{python_sitelib}/djblets/ %changelog * Tue Jul 31 2012 Stephen Gallagher - 0.6.22-1 - New upstream releae 0.6.22 - Fixes to support Review Board 1.6.11 - djblets.datagrid: - Improved performance of the datagrids - djblets.util: - The ifuserorperm template tag now accepts both IDs and User objects, allowing comparisons to be made without fetching the User - Fixed a bug with ifuserorperm and non-int IDs - User and AnonymousUser are no longer imported globally in the djblets_utils templatetags. This fixes some breakages in apps that imported this file to get access to filters, but weren't running in a Django settings environment * Sat Jul 21 2012 Fedora Release Engineering - 0.6.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Tue Jun 12 2012 Stephen Gallagher - 0.6.19-1 - New upstream release 0.6.19 - JavaScript: - inlineEditor no longer bubbles keypress events up * Tue Jun 05 2012 Stephen Gallagher - 0.6.18-1 - New upstream release 0.6.18 - djblets.siteconfig: - Settings form rows in the template now have IDs indicating the row and CSS class names - Help text for fields are now marked as safe, so that the contents aren't escaped - The form's disabled_reasons is no longer assumed to be populated - The initial field values are now always set - djblets.util: - Added a json_dumps filter, which serialized a value to JSON * Wed Apr 25 2012 Stephen Gallagher - 0.6.17-2 - Fix Django requirement for F18+ - Guarantee rebuild of egg-info * Wed Apr 25 2012 Stephen Gallagher - 0.6.17-1 - New upstream release 0.6.17 - djblets.gravatars: - Gravatars are no longer hard-coded to be jpegs. This was breaking some gravatars. - JavaScript: - inlineEditor now has a showRequiredFlag option for indicating if a field is required. - inlineEditor now indicates when its dirty state changes * Mon Feb 27 2012 Stephen Gallagher - 0.6.16-1 - New upstream release 0.6.16 - djblets.pipeline: - Replaced the djblets.compress module with djblets.pipeline. - djblets.util: - Fixed Django 1.4 compatibility. - Fix parsing of tokens in a blocktag in Django 1.4 - djblets.datagrid: - Removed an extraneous in the paginator - Fixed a compatibility issue with Django 1.4 in the queries - djblets.webapi: - Add support for resource-specific mimetypes - Accept "true" as a valid boolean value in the web API * Sat Jan 14 2012 Fedora Release Engineering - 0.6.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Nov 10 2011 Stephen Gallagher - 0.6.14-1 - New upstream release - djblets.testing: - Added a new TestCase class and @add_fixtures decorator for having fixtures specific to text functions. - djblets.util: - Fixed defaults on counter fields on new model instances. - Added a controlled_subprocess context manager for Python 2.5+. - Moved controlled_subprocess into djblets.util.contextmanagers. - Fixed a syntax error in controlled_subprocess on Python 2.4 and 2.5. - The jQuery and jQuery-UI versions are now referenced in only one place, in js/jquery.html and js/jquery-ui.html. Other templates can include these and keep up-to-date with the versions Djblets provides. - djblets.log: - Allow logging page access times. - Include the HTTP method in the new page request logs. - djblets.webapi: - API authorization failures, misparsed headers, and authorization attempts are now logged. - Fixed authentication failures when ":" was in the password. - djblets.compress: - Added a new filters for django-compress that handles lesscss (http://lesscss.org) files and automatically converts/deploys as CSS. - Added new templates for django-compress that handles the MEDIA_SERIAL suffix. - djblets.siteconfig: - The settings template now allows fields to not have a label by setting "fields_no_label" to True in the form class. * Tue Sep 13 2011 Stephen Gallagher - 0.6.11-1 - djblets.testing: * Added a new TestCase class and @add_fixtures decorator for having fixtures specific to text functions. - djblets.util: * Fixed defaults on counter fields on new model instances. * Mon Aug 22 2011 Stephen Gallagher - 0.6.10-1 - New upstream release 0.6.10 - Required for ReviewBoard 1.5.6 * Mon Jul 25 2011 Stephen Gallagher - 0.6.9-15 - New upstream release 0.6.9 - Required for ReviewBoard 1.6 * Thu Jun 23 2011 Stephen Gallagher - 0.6.8-14 - New upstream release 0.6.8 - djblets.datagrid: - * Fixed an occasional ValueError with the datagrid. - On occasion, the "active" state of a column can sometimes be - True when the column isn't in self.datagrid.columns, which meant - it would throw a ValueError when trying to remove itself from the - list. We're more bullet-proof now. - djblets.gravatars: - * The gravatar templatetag no longer errors out if the provided user - is anonymous. - djblets.log: - * The "Logging to..." lines are now only logged when settings.DEBUG - is on. - djblets.util: - * JSONField no longer errors out if blank=False is used. (Bug #2015) - * Fixed escaping of label names in label_tag() on newer versions - of Django. - djblets.webapi: - * Fixed a problem when settings.WEB_API_ENCODERS isn't set. - Our fallback for when this setting wasn't set was broken, causing - new errors. * Tue Feb 08 2011 Fedora Release Engineering - 0.6.7-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Jan 10 2011 Stephen Gallagher - 0.6.7-12 - New upstream release 0.6.7 - djblets.datagrid: - The datagrids now use a RequestContext when rendering cells, allowing - the columns or templates to access data from context processors. - djblets.siteconfig: - The form body of a siteconfig settings page can now be replaced. - It's now stored in the "form_content" block. - SiteConfigurationManager no longer crashes if trying to clear - the cache for a SiteConfiguration that no longer exists. - djblets.testing: - The Selenium test suite has been updated to support Django 1.2's - multi-database support. Previously, fixtures would fail to load - if using the new settings.DATABASES variable. - djblets.util: - The @augment_method_from decorator wasn't properly calling up the - decorator chain, preventing some decorators from being invoked. This - has been fixed to ensure all decorators are called. - - djblets.webapi: - Due to the @augment_method_from breakage listed above, webapi - decorators could fail to add their own checks, causing various - problems in field checking and authentication. This is now fixed. - The Permission Denied (HTTP 403) errors being returned weren't - sufficient for clients that weren't authenticated. Now, an - unauthenticated client will instead see Not Logged In (HTTP 401) - errors. - - The HTTP_AUTHORIZATION header is now checked on all requests. When - provided by the client, it will be used for authentication. This - means that clients can now force a login from their very first - request on, instead of requiring a HTTP 401 Unauthorized being - sent out first. - - This will also prevent multiple logins across different requests - from the same client, when the HTTP_AUTHORIZATION header is passed - on each request. This makes requests less heavy-weight and prevents - the last_login timestamp on the User from being updated on each - request. - - As part of this change, any webapps manually using the - @webapi_login_required decorator without the new resource code - will no longer support HTTP Basic auth. However, this was never - a supported feature anyway, and was more there by accident. - - The 'api_format' parameter in requests is now treated specially - and doesn't trigger any invalid attribute errors during field - validation. - - WebAPIResource.delete now uses get_object instead of fetching - the object directly, which simplifies the function and guarantees - that the correct object is used (especially when a resource - overrides get_object). - - Redirects now preserve any special parameters ("callback", - "_method", "expand", and "api_format") passed to the request. - This works around problems in HTTP implementations that don't - allow the caller to know that redirects occurred (such as major - browsers), which would lead to this information being stripped and - the wrong results being returned. - - The "expand" parameter for expanding links in payloads is now - supported for POST and PUT requests. * Mon Nov 22 2010 Stephen Gallagher - 0.6.6-11 - New upstream release 0.6.6 - djblets.util: - Fixed a compatibility problem with JSONField and Django 1.1. It - was assuming support for Django 1.2's multi-database support. - Fixed multi-database support in Django 1.2 with JSONField, where - the default connection was always being used in one case. * Mon Nov 22 2010 Stephen Gallagher - 0.6.5-10 - djblets.datagrid: - MEDIA_SERIAL is now used for all the images in the datagrid - template. Patch by Ben Hollis. - djblets.util: - Added a @root_url decorator for use with get_absolute_url - implementations, which appends SITE-ROOT to any returned URLs. - Added a CounterField for atomically updating counters. - CounterField can be used to atomically increment or decrement - an integer stored in the database, on individual models or - on many models at a time. It's intended to substitute for - potentially expensive or numerous SQL queries that retrieve - counts of objects. - Updated the custom fields for Django 1.2 multi-database - compatibility. - djblets.webapi: - Fixed a bug in serializing 'long' values in XML. - Resources now Vary on HTTP Accept, meaning that the browser won't - cache the wrong response type when accessing the same resource - with two different requested mimetypes. - Reduced the SQL query count for resources. - Fixed problems that could occur with URLs when serializing objects in - a list and when returning links. * Mon Sep 20 2010 Stephen Gallagher - 0.6.4-9 - New upstream release 0.6.4 - http://downloads.reviewboard.org/releases/Djblets/0.6/Djblets-0.6.4.NEWS * Thu Jul 22 2010 David Malcolm - 0.6.3-8 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Mon Jul 06 2010 Stephen Gallagher 0.6.3-7 - Added utility functions for HTTP Accept-based content negotation. - Add some gravy to make sites work better on iphone/ipad Safari - Required for ReviewBoard 1.5rc1 and later * Fri May 14 2010 Stephen Gallagher 0.6.2-6 - Fixed rendering issues with columns in the datagrids - Fixed over-caching of columns - Added a new resource-based model for doing more RESTful APIs - Required for ReviewBoard 1.5beta2 and later * Mon Apr 05 2010 Stephen Gallagher 0.5.9-4 - Translated strings no longer break cache backends - Performance improvements for djblets.datagrid - Fix "stale settings" issue. No longer need to restart apache to - see updated settings - Use updated web API settings. No longer assume all API calls - succeed * Fri Mar 12 2010 Stephen Gallagher 0.5.7-3 - Correct required minimum Django version to 1.1.1 * Fri Mar 12 2010 Stephen Gallagher 0.5.7-2 - Update to latest upstream release - Contains new features required by ReviewBoard 1.5 * Mon Dec 21 2009 Stephen Gallagher 0.5.6-0 - Update to latest upstream release - Remove pre-release handling in the package name and spec * Fri Oct 23 2009 Dan Young - 0.5-0.3.rc1 - Fix License tag * Wed May 13 2009 Dan Young - 0.5-0.2.rc1 - BuildRequires: python and python-setuptools * Thu May 7 2009 David Malcolm - 0.5-0.1.rc1 - bump to upstream 0.5rc1 - add NEWS and AUTHORS files as documentation * Thu May 7 2009 David Malcolm - 0.5-0.1.alpha3 - rename from Djblets to python-djblets - update version/release to try to preserve update path (prerelease issues) - fix mixed tabs/spaces in specfile (use spaces throughout) - remove tests subdirectory - make feedparser.py executable * Sat Feb 21 2009 Ramez Hanna - First build.