Set configuration file ownership
[rainbowstream.git] / setup.py
index ae0049449fed54f1bd1c24f07b9d740f566ca7c6..fe065349969f009c0a73000846f4cf713e473718 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,28 +1,37 @@
 from setuptools import setup, find_packages
-import os, os.path, sys
+import os
+import os.path
+import sys
+
+if sys.version[0] == "2":
+    from pipes import quote
+else:
+    from shlex import quote
 
 # Bumped version
-version = '0.5.4'
+version = '1.3.3'
 
 # Require
 install_requires = [
     "python-dateutil",
-    "requests",
+    "arrow",
+    "requests==2.5.3",
     "pyfiglet",
-    "SQLAlchemy",
     "twitter",
     "Pillow",
+    "PySocks"
 ]
 
-# Python 3 doesn't hava pysqlite
-if sys.version[0] == "2":
-    install_requires += ["pysqlite"]
+# Default user (considers non virtualenv method)
+user = os.environ.get('SUDO_USER', os.environ['USER'])
 
 # Copy default config if not exists
 default = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
 if not os.path.isfile(default):
     cmd = 'cp rainbowstream/colorset/config ' + default
     os.system(cmd)
+    cmd = 'chown ' + quote(user) + ' ' + default
+    os.system(cmd)
     cmd = 'chmod 777 ' + default
     os.system(cmd)