diff --git a/{{cookiecutter.repo_name}}/setup.py b/{{cookiecutter.repo_name}}/setup.py index b0720d76..89a68380 100644 --- a/{{cookiecutter.repo_name}}/setup.py +++ b/{{cookiecutter.repo_name}}/setup.py @@ -1,30 +1,24 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - -import os -import sys - +from __future__ import unicode_literals try: from setuptools import setup except ImportError: from distutils.core import setup -import {{ cookiecutter.repo_name }} -version = {{ cookiecutter.repo_name }}.__version__ - setup( - name='{{ cookiecutter.project_name }}', - version=version, + name="{{ cookiecutter.project_name }}", + version="{{ cookiecutter.version }}", author="{{ cookiecutter.author_name }}", - author_email='{{ cookiecutter.email }}', + author_email="{{ cookiecutter.email }}", packages=[ - '{{ cookiecutter.repo_name }}', + "{{ cookiecutter.repo_name }}", ], include_package_data=True, install_requires=[ - 'Django>=1.7.4', + "Django==1.7.6", ], zip_safe=False, - scripts=['{{ cookiecutter.repo_name }}/manage.py'], + scripts=["{{ cookiecutter.repo_name }}/manage.py"], ) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py index 704b5032..ebc6a5e1 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py @@ -1 +1,3 @@ +# -*- coding: utf-8 -*- __version__ = '{{ cookiecutter.version }}' +__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])