Merge pull request #14 from greatestape/travis-badge
[PyCIM.git] / setup.py
blob354c4d80c6f0de349b7c278f4c237f057b384045
1 import os
3 kwds = {}
5 if int(os.getenv('USE_DISTUTILS', 0)) != 0:
6 from distutils.core import setup
7 def find_packages():
8 packages = []
9 basedir = os.getcwd()
10 for root, dirnames, filenames in os.walk(basedir):
11 for dirname in dirnames:
12 initfile = os.path.join(root, dirname, "__init__.py")
13 if os.path.exists(initfile):
14 # python 2.4+
15 packages.append(os.path.relpath(initfile, basedir))
16 packages = [ os.path.dirname(p).replace(os.path.sep, ".") for p in packages ]
17 return sorted(packages)
19 # To add the test data to the final package
20 if int(os.getenv('INCLUDE_PACKAGE_DATA', 0)) != 0:
21 kwds['package_data'] = { 'PyCIM.Test' : [ 'Data/*'], }
22 else:
23 from setuptools import setup, find_packages
24 kwds['include_package_data'] = False
25 kwds['test_suite'] = "PyCIM.Test"
26 kwds['zip_safe'] = True
29 # Read the long description from the README.
30 thisdir = os.path.abspath(os.path.dirname(__file__))
31 f = open(os.path.join(thisdir, "README.rst"))
32 kwds["long_description"] = f.read()
33 f.close()
35 setup(name="PyCIM",
36 version="15.13.4",
37 author="Richard Lincoln",
38 author_email="r.w.lincoln@gmail.com",
39 description="Python implementation of the Common Information Model.",
40 license="MIT",
41 url="http://www.pycim.org/",
42 packages=find_packages(),
43 **kwds)
45 # python setup.py sdist bdist_egg bdist_wininst bdist_msi upload