Update README.rst
[PyCIM.git] / setup.py
blob5b0fe18aef672ce354bfb571ff08c3e7d6b7c8f5
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.15.0",
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="https://github.com/rwl/PyCIM",
42 classifiers=[
43 'Development Status :: 5 - Production/Stable',
44 'Intended Audience :: Developers',
45 'Intended Audience :: Science/Research',
46 'Topic :: Scientific/Engineering',
47 'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
48 'License :: OSI Approved :: MIT License',
49 'Programming Language :: Python :: 2',
50 'Programming Language :: Python :: 2.6',
51 'Programming Language :: Python :: 2.7',
52 'Programming Language :: Python :: 3',
53 'Programming Language :: Python :: 3.4',
54 'Programming Language :: Python :: 3.5',
55 'Programming Language :: Python :: 3.6',
57 packages=find_packages(),
58 extras_require={
59 'test': ['pytest'],
60 'build': ['twine'],
62 **kwds)
64 # python setup.py sdist bdist_egg bdist_wininst bdist_msi upload