import codecs as _codecs
from distutils.core import setup as _setup, Command
-import itertools as _itertools
import os as _os
+import sys
from catalyst import __version__
from catalyst.version import set_release_version, get_version
tag = '{0}-{1}'.format(package_name, __version__)
+if _os.path.sep != '/':
+ print("ERROR: This system does not appear to be a 'POSIX' system.")
+ print("Catalyst is meant to install and run on a 'GENTOO' system only.")
+ sys.exit(2)
+
def files(root, target):
"""Iterate through all the file paths under `root`
[1]: http://docs.python.org/2/distutils/setupscript.html#writing-the-setup-script
"""
- def ensure_slash(path):
- if _os.path.sep != '/':
- path.replace(_os.path.sep, '/')
- return path
- filedict = {}
for dirpath, dirnames, filenames in _os.walk(root):
key = _os.path.join(target, dirpath)
filepaths = []
for _file in filenames:
- _filepath = ensure_slash(_os.path.join(dirpath, _file))
+ _filepath = _os.path.join(dirpath, _file)
filepaths.append(_filepath)
- filedict[key] = filepaths
- for key in sorted(filedict):
- if len(filedict[key]):
- yield (key, filedict[key])
+ yield (key, filepaths)
_data_files = [('/etc/catalyst', ['etc/catalyst.conf','etc/catalystrc']),