Skip to content

Commit

Permalink
Merge branch 'release/0.6.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed May 18, 2014
2 parents bffa52f + fcfc74e commit cc1e420
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
10 changes: 5 additions & 5 deletions django_markdown/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version_info = (0, 5, 4)
""" Django-Markdown supports markdown in Django. """

__version__ = VERSION = '.'.join(map(str, version_info))
__project__ = PROJECT = 'django-markdown'
__author__ = AUTHOR = "Kirill Klenov <horneds@gmail.com>"
__license__ = LICENSE = "GNU LGPL"
__version__ = "0.6.0"
__project__ = "django-markdown"
__author__ = "Kirill Klenov <horneds@gmail.com>"
__license__ = "GNU LGPL"
2 changes: 1 addition & 1 deletion pylama.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[main]
skip=setup.py,example/*
skip=example/*
ignore=E1002

[*/__init__.py]
Expand Down
29 changes: 17 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
""" Setup Django-Markdown. """

import os

from setuptools import setup, find_packages

from django_markdown import VERSION, PROJECT, LICENSE
import re


MODULE_NAME = 'django_markdown'
Expand All @@ -15,21 +16,26 @@
(root[len(MODULE_NAME) + 1:], filename))


def read(fname):
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''

install_requires = [l for l in read('requirements.txt').split('\n')
_meta = _read('django_markdown/__init__.py')
_license = re.search(r'^__license__\s*=\s*"(.*)"', _meta, re.M).group(1)
_project = re.search(r'^__project__\s*=\s*"(.*)"', _meta, re.M).group(1)
_version = re.search(r'^__version__\s*=\s*"(.*)"', _meta, re.M).group(1)

install_requires = [l for l in _read('requirements.txt').split('\n')
if l and not l.startswith('#')]

META_DATA = dict(
name=PROJECT,
version=VERSION,
description=read('DESCRIPTION'),
long_description=read('README.rst'),
license=LICENSE,
setup(
name=_project,
version=_version,
description=_read('DESCRIPTION'),
long_description=_read('README.rst'),
license=_license,

author="Kirill Klenov",
author_email="horneds@gmail.com",
Expand All @@ -55,5 +61,4 @@ def read(fname):
test_suite='tests',
)

if __name__ == "__main__":
setup(**META_DATA)
# pylama:ignore=C0111

0 comments on commit cc1e420

Please sign in to comment.