Created
April 13, 2014 18:21
-
-
Save Seraf/10595757 to your computer and use it in GitHub Desktop.
setup.py for lisa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup, find_packages | |
from pip.req import parse_requirements | |
import json | |
import pip | |
import os | |
from distutils.command.install_data import install_data | |
import shutil | |
from django.core.management import call_command | |
# Ugly hack but django-tastypie-mongoengine require mongoengine 0.8.1 | |
# but this version has some problem with new django versions | |
# As there's a bug with something I don't use, it doesn't matters | |
# if it use a newer version. So let's upgrade it programmatically | |
pip.main(['install', '-r', 'install/requirements.txt']) | |
VERSION = '0.1.0.15' | |
if __name__ == '__main__': | |
setup( | |
version=VERSION, | |
name='lisa-server', | |
packages=find_packages() + ["twisted.plugins"], | |
package_data={'twisted.plugins': ['twisted/plugins/lisaserver_plugin.py']}, | |
url='http://www.lisa-project.net', | |
license='MIT', | |
author='Julien Syx', | |
author_email='julien.syx@gmail.com', | |
description='LISA home automation system - Server', | |
include_package_data=True, | |
namespace_packages = ['lisa'], | |
scripts = ['lisa/server/lisa-cli'], | |
classifiers=[ | |
'Development Status :: 4 - Beta', | |
'Environment :: Console', | |
'License :: OSI Approved :: MIT License', | |
'Operating System :: POSIX', | |
'Programming Language :: Python :: 2', | |
'Programming Language :: Python :: 2.7', | |
'Topic :: Internet :: WWW/HTTP', | |
'Topic :: Software Development :: Libraries :: Python Modules', | |
], | |
) | |
# Make Twisted regenerate the dropin.cache, if possible. This is necessary | |
# because in a site-wide install, dropin.cache cannot be rewritten by | |
# normal users. | |
try: | |
from twisted.plugin import IPlugin, getPlugins | |
except ImportError: | |
pass | |
else: | |
list(getPlugins(IPlugin)) | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lisa.server.web.weblisa.settings") | |
call_command('collectstatic', interactive=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment