mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-14 05:36:58 +03:00
Merge pull request #52 from ashwoods/master
making project folder a valid python package
This commit is contained in:
commit
dcb1869f32
|
@ -5,5 +5,6 @@
|
||||||
"email": "Your email",
|
"email": "Your email",
|
||||||
"description": "A short description of the project.",
|
"description": "A short description of the project.",
|
||||||
"year": "2013",
|
"year": "2013",
|
||||||
"domain_name": "example.com"
|
"domain_name": "example.com",
|
||||||
|
"version": "0.1.0"
|
||||||
}
|
}
|
||||||
|
|
30
{{cookiecutter.repo_name}}/setup.py
Normal file
30
{{cookiecutter.repo_name}}/setup.py
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from setuptools import setup
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
import {{ cookiecutter.project_name }}
|
||||||
|
version = {{ cookiecutter.repo_name }}.__version__
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name='{{ cookiecutter.project_name }}',
|
||||||
|
version=version,
|
||||||
|
author='{{ cookiecutter.full_name }}',
|
||||||
|
author_email='{{ cookiecutter.email }}',
|
||||||
|
packages=[
|
||||||
|
'{{ cookiecutter.project_name }}',
|
||||||
|
],
|
||||||
|
include_package_data=True,
|
||||||
|
install_requires=[
|
||||||
|
'Django>=1.6.1',
|
||||||
|
],
|
||||||
|
zip_safe=False,
|
||||||
|
scripts=['{{ cookiecutter.project_name }}/manage.py'],
|
||||||
|
)
|
|
@ -0,0 +1 @@
|
||||||
|
__version__ = '{{ cookiecutter.version }}'
|
|
@ -3,7 +3,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.project_name}}.config.settings")
|
||||||
os.environ.setdefault("DJANGO_CONFIGURATION", "Local")
|
os.environ.setdefault("DJANGO_CONFIGURATION", "Local")
|
||||||
|
|
||||||
from configurations.management import execute_from_command_line
|
from configurations.management import execute_from_command_line
|
Loading…
Reference in New Issue
Block a user