Skip to content

Commit

Permalink
Rework app metadata and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed Nov 6, 2015
1 parent 978bc95 commit 7743f5d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 52 deletions.
16 changes: 16 additions & 0 deletions djcelery_email/__about__.py
@@ -0,0 +1,16 @@
__all__ = [
'__title__', '__summary__', '__uri__', '__version__', '__author__',
'__email__', '__license__', '__copyright__',
]

__title__ = 'django-celery-email'
__summary__ = 'An async Django email backend using celery'
__uri__ = 'https://github.com/pmclanahan/django-celery-email'

__version__ = '1.1.3'

__author__ = 'Paul McLanahan'
__email__ = 'paul@mclanahan.net'

__license__ = 'BSD'
__copyright__ = 'Copyright 2015 {0}'.format(__author__)
10 changes: 1 addition & 9 deletions djcelery_email/__init__.py
@@ -1,9 +1 @@
"""Django email backend for celery."""

VERSION = (1, 1, 3)

__version__ = '.'.join(map(str, VERSION))
__author__ = 'Paul McLanahan'
__contact__ = 'paul@mclanahan.net'
__homepage__ = 'https://github.com/pmclanahan/django-celery-email'
__license__ = 'BSD (3 clause)'
from __about__ import * # noqa
86 changes: 43 additions & 43 deletions setup.py
Expand Up @@ -4,29 +4,25 @@
import sys
import codecs

try:
from setuptools import setup, find_packages, Command
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages, Command
from setuptools import setup, find_packages, Command

import djcelery_email as distmeta

base_dir = os.path.dirname(__file__)


class RunTests(Command):
description = "Run the django test suite from the tests dir."
description = 'Run the django test suite from the tests dir.'
user_options = []

def run(self):
this_dir = os.getcwd()
testproj_dir = os.path.join(this_dir, "test_project")
testproj_dir = os.path.join(this_dir, 'test_project')
sys.path.append(testproj_dir)

from django.core.management import execute_from_command_line
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
os.chdir(testproj_dir)
execute_from_command_line([__file__, "test"])
execute_from_command_line([__file__, 'test'])
os.chdir(this_dir)

def initialize_options(self):
Expand All @@ -36,47 +32,51 @@ def finalize_options(self):
pass


if os.path.exists("README.rst"):
long_description = codecs.open("README.rst", "r", "utf-8").read()
else:
long_description = "See http://pypi.python.org/pypi/django-celery-email"
with codecs.open(os.path.join(base_dir, 'README.rst')) as f:
long_description = f.read()

about = {}
with open(os.path.join(base_dir, 'djcelery_email', '__about__.py')) as f:
exec (f.read(), about)


setup(
name='django-celery-email',
version=distmeta.__version__,
description=distmeta.__doc__,
author=distmeta.__author__,
author_email=distmeta.__contact__,
url=distmeta.__homepage__,
platforms=["any"],
license="BSD",
name=about['__title__'],
version=about['__version__'],
description=about['__summary__'],
long_description=long_description,
license=about['__license__'],
url=about['__uri__'],
author=about['__author__'],
author_email=about['__email__'],
platforms=['any'],
packages=find_packages(exclude=['ez_setup', 'test_project', 'test_project.*']),
scripts=[],
zip_safe=False,
install_requires=[
"django",
"celery>=2.3.0",
"django-appconf",
'django>=1.7',
'celery>=2.3.0',
'django-appconf',
],
cmdclass={"test": RunTests},
cmdclass={'test': RunTests},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Topic :: Communications",
"Topic :: Communications :: Email",
"Topic :: System :: Distributed Computing",
"Topic :: Software Development :: Libraries :: Python Modules",
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Topic :: Communications',
'Topic :: Communications :: Email',
'Topic :: System :: Distributed Computing',
'Topic :: Software Development :: Libraries :: Python Modules',
],
entry_points={},
long_description=long_description,
)

0 comments on commit 7743f5d

Please sign in to comment.