fix(setup.py): do not import package in setup.py

- adds `__version_info__` meta for package
- update django requirement to 1.7.6

closes #98
This commit is contained in:
Saurabh Kumar 2015-03-12 13:54:22 +05:30
parent bddf914bd5
commit 91c3ff00ed
2 changed files with 9 additions and 13 deletions

View File

@ -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"],
)

View File

@ -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('.')])