setup.py 2.1 KB
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1
from distutils.core import setup
2
import cdist
Nico Schottelius's avatar
Nico Schottelius committed
3
import os
4
import re
Nico Schottelius's avatar
Nico Schottelius committed
5

6

Nico Schottelius's avatar
Nico Schottelius committed
7 8 9
def data_finder(data_dir):
    entries = []
    for name in os.listdir(data_dir):
10 11 12 13 14

        # Skip .gitignore files
        if name == ".gitignore":
            continue

15 16 17 18 19
        # Skip vim swp files
        swpfile = re.search(r'^\..*\.swp$', name)
        if swpfile:
            continue

Nico Schottelius's avatar
Nico Schottelius committed
20 21 22 23 24 25 26 27
        entry = os.path.join(data_dir, name)
        if os.path.isdir(entry):
            entries.extend(data_finder(entry))
        else:
            entries.append(entry)

    return entries

Darko Poljak's avatar
Darko Poljak committed
28

Nico Schottelius's avatar
Nico Schottelius committed
29 30
cur = os.getcwd()
os.chdir("cdist")
Nico Schottelius's avatar
Nico Schottelius committed
31
package_data = data_finder("conf")
Nico Schottelius's avatar
Nico Schottelius committed
32
os.chdir(cur)
Nico Schottelius's avatar
Nico Schottelius committed
33

34

Nico Schottelius's avatar
Nico Schottelius committed
35
setup(
36 37
    name="cdist",
    packages=["cdist", "cdist.core", "cdist.exec", "cdist.util", ],
Nico Schottelius's avatar
Nico Schottelius committed
38
    package_data={'cdist': package_data},
39
    scripts=["scripts/cdist", "scripts/cdist-dump"],
40 41 42 43 44 45
    version=cdist.version.VERSION,
    description="A Usable Configuration Management System",
    author="Nico Schottelius",
    author_email="nico-cdist-pypi@schottelius.org",
    url="http://www.nico.schottelius.org/software/cdist/",
    classifiers=[
Nico Schottelius's avatar
Nico Schottelius committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
        "Development Status :: 6 - Mature",
        "Environment :: Console",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: BSD",
        "Operating System :: POSIX :: Linux",
        "Operating System :: Unix",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Topic :: System :: Boot",
        "Topic :: System :: Installation/Setup",
        "Topic :: System :: Operating System",
        "Topic :: System :: Software Distribution",
        "Topic :: Utilities"
    ],
63
    long_description='''
Nico Schottelius's avatar
Nico Schottelius committed
64
        cdist is a usable configuration management system.
65 66 67
        It adheres to the KISS principle and is being used in small up to
        enterprise grade environments.
        cdist is an alternative to other configuration management systems like
Nico Schottelius's avatar
Nico Schottelius committed
68
        cfengine, bcfg2, chef and puppet.
Nico Schottelius's avatar
Nico Schottelius committed
69 70
    '''
)