-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
131 lines (103 loc) · 5.45 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
#NOTE: if you want to develop openode
#you might want to install django-debug-toolbar as well
import openode
setup(
name = "openode",
version = openode.get_version(), # remember to manually set this correctly
description = 'Question and Answer forum, like StackOverflow, written in python and Django',
packages = find_packages(),
author = 'Evgeny.Fadeev',
author_email = '[email protected]',
license = 'GPLv3',
keywords = 'forum, community, wiki, Q&A',
entry_points = {
'console_scripts': [
'openode-setup = openode.deployment:openode_setup',
]
},
zip_safe = False,
url = 'http://openode.org',
include_package_data = True,
install_requires = openode.REQUIREMENTS.values(),
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Natural Language :: Finnish',
'Natural Language :: German',
'Natural Language :: Russian',
'Natural Language :: Serbian',
'Natural Language :: Turkish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: JavaScript',
'Topic :: Communications :: Usenet News',
'Topic :: Communications :: Email :: Mailing List Servers',
'Topic :: Communications',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
long_description = """Openode will work alone or with other django apps (with some limitations, please see below), Django 1.1.1 - 1.2.3(*), MySQL(**) and PostgresQL(recommended) (>=8.3).
Questions? Suggestions? Found a bug? -> please post at http://openode.org/
Features
========
* standard Q&A functionalities including votes, reputation system, etc.
* user levels: admin, moderator, regular, suspended, blocked
* per-user inbox for responses & flagged items (for moderators)
* email alerts - instant and delayed, optionally tag filtered
* search by full text and a set of tags simultaneously
* can import data from stackexchange database file
Installation
============
The general steps are:
* install the code
* if there is no database yet - create one
* create a new or configure existing django site for openode
* create/update the database tables
Methods to install code
-----------------------
* **pip install openode**
* **easy_install openode**
* **download .tar.gz** file from the bottom of this page, then run **python setup.py install**
* clone code from the github **git clone git://github.com/PLUTO/openode-devel.git**, and then **python setup.py develop**
Create/configure django site
----------------------------
Either run command **openode-setup** or merge contents of directory **openode/setup_templates** in the source code into your project directory.
Create/update database tables
-----------------------------
Back up your database if it is not blank, then two commands:
* python manage.py syncdb
* python manage.py migrate
There are two apps to migrate - openode and django_authopenid (a forked version of the original, included within openode), so you can as well migrate them separately
Limitations
===========
There are some limitations that will be removed in the future. If any of these cause issues - please do not hesitate to contact [email protected].
Openode patches `auth_user` table. The migration script will automatically add missing columns, however it will not overwrite any existing columns. Please do back up your database before adding openode to an existing site.
Included into openode there are two forked apps: `django_authopenid` and `livesettings`. If you have these apps on your site, you may have trouble installing openode.
User registration and login system is bundled with Openode. It is quite good though, it allows logging in with password and many authentication service providers, including popular social services and recover account by email.
If there are any other collisions, openode will simply fail to install, it will not damage your data.
Background Information
======================
Openode is based on CNPROG project by Mike Chen and Sailing Cai, project which was originally inspired by StackOverflow and Yahoo Answers.
Footnotes
=========
(*) - If you want to install with django 1.2.x a dependency "Coffin-0.3" needs to be replaced with "Coffin-0.3.3" - this will be automated in the future versions of the setup script.
(**) - With MySQL you have to use MyISAM data backend, because it's the only one that supports Full Text Search."""
)
print """**************************************************************
* *
* Thanks for installing Openode. *
* *
* To start deploying type: openode-setup *
* Please take a look at the manual openode/doc/INSTALL *
* And please do not hesitate to ask your questions at *
* at http://openode.org *
* *
**************************************************************"""