Skip to content

Commit

Permalink
Install was broken, release 2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Apr 13, 2012
1 parent d2f47ce commit 2bfdc62
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 12 deletions.
14 changes: 13 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@
.. contents::
:local:

.. _version-2.5.3:

2.5.3
=====
:release-date: 2012-04-13 06:16 P.M GMT
:by: Ask Solem

* 2.5.2 release broke installation because of an import in the package.

Fixed by not having setup.py import the djcelery module anymore,
but rather parsing the package file for metadata.

.. _version-2.5.2:

2.5.2
=====
:release-date: 2012-04-12 05:00 P.M GMT
:release-date: 2012-04-13 05:00 P.M GMT
:by: Ask Solem

.. _v251-news:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.. image:: http://cloud.github.com/downloads/ask/celery/celery_128.png

:Version: 2.5.2
:Version: 2.5.3
:Web: http://celeryproject.org/
:Download: http://pypi.python.org/pypi/django-celery/
:Source: http://github.com/ask/django-celery/
Expand Down
6 changes: 4 additions & 2 deletions djcelery/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
"""Django Celery Integration."""
# :copyright: (c) 2009 - 2012 by Ask Solem.
# :license: BSD, see LICENSE for more details.
from __future__ import absolute_import

import os

VERSION = (2, 5, 2)

VERSION = (2, 5, 3)
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Ask Solem"
__contact__ = "ask@celeryproject.org"
__homepage__ = "http://celeryproject.org"
__docformat__ = "restructuredtext"
__license__ = "BSD (3 clause)"

# -eof meta-

def setup_loader():
os.environ.setdefault("CELERY_LOADER", "djcelery.loaders.DjangoLoader")
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.. image:: http://cloud.github.com/downloads/ask/celery/celery_128.png

:Version: 2.5.2
:Version: 2.5.3
:Web: http://celeryproject.org/
:Download: http://pypi.python.org/pypi/django-celery/
:Source: http://github.com/ask/django-celery/
Expand Down
52 changes: 45 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,45 @@
from setuptools import setup, Command # noqa
from distutils.command.install import INSTALL_SCHEMES

import djcelery as distmeta
# -*- Distribution Meta -*-
NAME = "django-celery"

import re
re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)')
re_vers = re.compile(r'VERSION\s*=\s*\((.*?)\)')
re_doc = re.compile(r'^"""(.+?)"""')
rq = lambda s: s.strip("\"'")

def add_default(m):
attr_name, attr_value = m.groups()
return ((attr_name, rq(attr_value)), )


def add_version(m):
v = list(map(rq, m.groups()[0].split(", ")))
return (("VERSION", ".".join(v[0:3]) + "".join(v[3:])), )


def add_doc(m):
return (("doc", m.groups()[0]), )

pats = {re_meta: add_default,
re_vers: add_version,
re_doc: add_doc}
here = os.path.abspath(os.path.dirname(__file__))
meta_fh = open(os.path.join(here, "djcelery/__init__.py"))
try:
meta = {}
for line in meta_fh:
if line.strip() == '# -eof meta-':
break
for pattern, handler in pats.items():
m = pattern.match(line.strip())
if m:
meta.update(handler(m))
finally:
meta_fh.close()


packages, data_files = [], []
root_dir = os.path.dirname(__file__)
Expand Down Expand Up @@ -122,12 +160,12 @@ def extra_args(self):


setup(
name='django-celery',
version=distmeta.__version__,
description=distmeta.__doc__,
author=distmeta.__author__,
author_email=distmeta.__contact__,
url=distmeta.__homepage__,
name=NAME,
version=meta["VERSION"],
description=meta["doc"],
author=meta["author"],
author_email=meta["contact"],
url=meta["homepage"],
platforms=["any"],
license="BSD",
packages=packages,
Expand Down

0 comments on commit 2bfdc62

Please sign in to comment.