Bug 191281 - [New port]: py-django-redis: redis cache/session backend
Summary: [New port]: py-django-redis: redis cache/session backend
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-22 18:34 UTC by Melvyn Sopacua
Modified: 2014-06-27 09:15 UTC (History)
1 user (show)

See Also:


Attachments
add-3.6.2.patch (2.32 KB, patch)
2014-06-22 18:34 UTC, Melvyn Sopacua
no flags Details | Diff
Add py-django-redis-3.6.2 (2.22 KB, patch)
2014-06-23 20:36 UTC, Melvyn Sopacua
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Melvyn Sopacua 2014-06-22 18:34:07 UTC
Created attachment 144035 [details]
add-3.6.2.patch

Django-redis is a BSD Licensed, full featured Redis cache/session backend for
Django.

Why use django-redis?

- In active development.
- Modular client system (pluggable clients).
- Master-Slave support in the default client.
- Complete battery of tests.
- Used in production in several projects as cache and session storage.
- Supports infinite timeouts.
- Python 3 support in same code base.
- Facilities for raw access to Redis client/connection pool.
- Highly configurable (can emulate memcached exception behavior, for example).
- Unix sockets supported by default.
- Pluggable parsers.

WWW: http://niwibe.github.io/django-redis/

Fix:
Buildarchive: https://redports.org/buildarchive/20140622174401-80741/
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-23 00:39:46 UTC
I'll take it, review pending
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-23 00:55:57 UTC
Great submission Melvyn, especially the included change to www/Makefile and including redports logs.

Review:

- Include portlint output (For either pass or fail)

- RUN_DEPENDS=, not +=, for the initial assignment, += for later
  assignments or conditional dependencies.
- Use Django pkgname (with respective versions) matching, rather than
  file for py-django dependency check
- Remove 'In active development' from pkg-descr, not a feature &
  information  could become stale
- Tab align USE_PYTHON value
- Add regression-test target (regression-test: build)
- Add test dependencies to TEST_DEPENDS
  
Bonus:

  - Add TESTS option
  - Add TEST_DEPENDS to BUILD_DEPENDS when TESTS option is set
  - Test suite passes (add output to bug comment)
  - Create PR/Issue upstream to add `python setup.py test` integration
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-23 00:56:48 UTC
Please attach a second version of your changes addressing those items
Comment 4 Melvyn Sopacua 2014-06-23 08:38:05 UTC
Will work on that tonight.
Comment 5 Melvyn Sopacua 2014-06-23 18:51:53 UTC
(In reply to Kubilay Kocak from comment #2)
> Great submission Melvyn, especially the included change to www/Makefile and
> including redports logs.

Thank you.

> - Use Django pkgname (with respective versions) matching, rather than
>   file for py-django dependency check

I copied this from www/django-mezzanine which is part of this effort. I'm setting up a new project with mezzanine and redis caching, but the mezzanine port is quite outdated. Since you also maintain that, are you already working to upgrade it? I've built 80% of a mezzanine 3.1.2 port, cause I need it short-term, but if you're already working on that, I can hold off on those submissions to bugzilla (2 new ports needed: tzlocal and requests-oauth).

> - Remove 'In active development' from pkg-descr, not a feature &
>   information  could become stale

Gotha.

>   - Create PR/Issue upstream to add `python setup.py test` integration

I'll have to read up on that, but going for the bonus points.
Comment 6 Melvyn Sopacua 2014-06-23 18:57:39 UTC
Ack, looks like I copied this from django-annoying. Here's list of ports that do it this way:
www/py-django-annoying/Makefile
www/py-django-app-plugins/Makefile
www/py-django-appmedia/Makefile
www/py-django-caching-app-plugins/Makefile
www/py-django-classy-tags/Makefile
www/py-django-json-rpc/Makefile
www/py-django-keyedcache/Makefile
www/py-django-photologue/Makefile
www/py-django-piston/Makefile
www/py-django-profiles/Makefile
www/py-django-signals-ahoy/Makefile
www/py-django-tables2/Makefile
www/py-django-tagging/Makefile
www/py-django-threaded-multihost/Makefile
www/py-django-tinymce/Makefile
Comment 7 Melvyn Sopacua 2014-06-23 19:27:05 UTC
Testing can't be done, they're not packaged:
https://github.com/niwibe/django-redis/blob/master/MANIFEST.in

Additionally, they'd require a working redis server, which is a blocker and a settings file within a django project that points to it. These are made to run on an already setup project to detect issues in the stack.
Comment 8 Melvyn Sopacua 2014-06-23 20:36:33 UTC
Created attachment 144080 [details]
Add py-django-redis-3.6.2

Portlint: looks fine

Redports:
https://redports.org/buildarchive/20140623202801-37364/

Full changelog:

changeset:   358594:d07f0e892b4b
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Sun Jun 22 12:28:37 2014 +0200
files:       www/Makefile www/py-django-redis/Makefile www/py-django-redis/distinfo www/py-django-redis/pkg-descr
description:
Add redis support for Django.


changeset:   358595:b5e3d6ae3271
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Sun Jun 22 17:56:13 2014 +0200
files:       www/py-django-redis/Makefile
description:
Prefix already adds the trailing dash


changeset:   358601:9f68cb219499
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Mon Jun 23 21:30:03 2014 +0200
files:       www/py-django-redis/pkg-descr
description:
Remove some lines from the pkg-descr:

1) active development is a good intention (koobs@)
2) since tests aren't packaged to PyPI, don't mention them.


changeset:   358602:db6d10880682
branch:      ports-mrs
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Mon Jun 23 21:37:58 2014 +0200
files:       www/py-django-redis/Makefile
description:
Fixes suggested by koobs@:

- use django version instead of file detection
- tab-align USE_PYTHON with values below (8 for ts)


changeset:   358603:6dcfa7fa1df4
branch:      ports-mrs
tag:         tip
user:        Melvyn Sopacua <melvyn@magemana.nl>
date:        Mon Jun 23 22:21:25 2014 +0200
files:       www/py-django-redis/Makefile www/py-django-redis/pkg-descr
description:
Pet portlint:

- Wrap at 72 chars (portlint says 80 but I prefer mail width)
- Remove trailing dot in COMMENT
Comment 9 commit-hook freebsd_committer freebsd_triage 2014-06-27 09:13:45 UTC
A commit references this bug:

Author: koobs
Date: Fri Jun 27 09:13:29 UTC 2014
New revision: 359482
URL: http://svnweb.freebsd.org/changeset/ports/359482

Log:
  [NEW] www/py-django-redis: Full featured Redis cache/session backend for Django

  Django-redis is a BSD Licensed, full featured Redis cache/session
  backend for Django.

  Why use django-redis?

   * Modular client system (pluggable clients).
   * Master-Slave support in the default client.
   * Used in production in several projects as cache and session storage.
   * Supports infinite timeouts.
   * Python 3 support in same code base.
   * Facilities for raw access to Redis client/connection pool.
   * Highly configurable (can emulate memcached exception behavior, for
     example).
   * Unix sockets supported by default.
   * Pluggable parsers.

  WWW: http://niwibe.github.io/django-redis

  PR:		191281
  Submitted by:	melvyn at magemana dot nl (with minor changes)

Changes:
  head/www/Makefile
  head/www/py-django-redis/
  head/www/py-django-redis/Makefile
  head/www/py-django-redis/distinfo
  head/www/py-django-redis/pkg-descr
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2014-06-27 09:15:03 UTC
Great job Melvyn! Committed with minor changes.