1 # GNU MediaGoblin -- federated, autonomous media hosting
2 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 from setuptools
import setup
, find_packages
22 VERSIONFILE
= os
.path
.join("mediagoblin", "_version.py")
23 VSRE
= r
"^__version__ = ['\"]([^
'\"]*)['\"]"
27 verstrline = open(VERSIONFILE, "rt
").read()
28 mo = re.search(VSRE, verstrline, re.M)
32 raise RuntimeError("Unable to find version string
in %s." %
38 version=get_version(),
39 packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
41 include_package_data = True,
42 # scripts and dependencies
61 'sqlalchemy<0.9.0, >0.8.0',
62 # newer sqlalchemy-migrate requires pbr which BREAKS EVERYTHING AND IS
63 # TERRIBLE AND IS THE END OF ALL THINGS
64 # I'd love to remove this restriction.
65 'sqlalchemy-migrate<0.8',
77 # PLEASE change this when we can; a dependency is forcing us to set this
78 # specific number and it is breaking setup.py develop
81 ## Annoying. Please remove once we can! We only indirectly
82 ## use pbr, and currently it breaks things, presumably till
83 ## their next release.
88 ## For now we're expecting that users will install this from
89 ## their package managers.
94 test_suite='nose.collector',
97 gmg = mediagoblin.gmg_commands:main_cli
98 pybabel = mediagoblin.babel.messages.frontend:main
101 app = mediagoblin.app:paste_app_factory
103 [paste.filter_app_factory]
104 errors = mediagoblin.errormiddleware:mgoblin_error_middleware
107 make_user_dev_dirs = mediagoblin.buildout_recipes:MakeUserDevDirs
110 jinja2 = jinja2.ext:babel_extract
113 author='Free Software Foundation and contributors',
114 author_email='cwebber@gnu.org',
115 url="http
://mediagoblin
.org
/",
116 download_url="http
://mediagoblin
.org
/download
/",
117 long_description=open(READMEFILE).read(),
119 "Development Status
:: 3 - Alpha
",
120 "Environment
:: Web Environment
",
121 "License
:: OSI Approved
:: GNU Affero General Public License v3
or later (AGPLv3
+)",
122 "Operating System
:: OS Independent
",
123 "Programming Language
:: Python
",
124 'Programming Language :: Python :: 2.6',
125 'Programming Language :: Python :: 2.7',
126 "Topic
:: Internet
:: WWW
/HTTP
:: Dynamic Content
"
130 # Check if the problem is caused by the sqlalchemy/setuptools conflict
132 if not (msg_as_str == 'dist must be a Distribution instance'):
135 # If so, tell the user it is OK to just run the script again.
136 print "\n\n---------- NOTE
----------"
137 print "The setup
.py command you ran failed
."
139 print ("It
is a known possible failure
. Just run it again
. It works the
"