Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge setup.py changes from master

  • Loading branch information...
commit bc7918787ac3a431f143ad19b49046fe3c98617e 1 parent d14584c
Brian Hatfield authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 setup.py
View
17 setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
+import platform
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
@@ -15,10 +16,16 @@
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log',[]), ('storage/rrd',[]) ]
conf_files = [ ('conf', glob('conf/*.example')) ]
-#XXX Need a way to have these work for bdist_rpm but be left alone for everything else
-#init_scripts = [ ('/etc/init.d', ['distro/redhat/init.d/carbon-cache',
-# 'distro/redhat/init.d/carbon-relay',
-# 'distro/redhat/init.d/carbon-aggregator']) ]
+
+install_files = storage_dirs + conf_files
+
+# If we are building on RedHat, let's use the redhat init scripts.
+if platform.dist()[0] == 'redhat':
+ init_scripts = [ ('/etc/init.d', ['distro/redhat/init.d/carbon-cache',
+ 'distro/redhat/init.d/carbon-relay',
+ 'distro/redhat/init.d/carbon-aggregator']) ]
+ install_files += init_scripts
+
setup(
name='carbon',
@@ -32,7 +39,7 @@
package_dir={'' : 'lib'},
scripts=glob('bin/*'),
package_data={ 'carbon' : ['*.xml'] },
- data_files=storage_dirs + conf_files, # + init_scripts,
+ data_files=install_files,
install_requires=['twisted', 'txamqp'],
**setup_kwargs
)
Please sign in to comment.
Something went wrong with that request. Please try again.