|
1 | | -import maec |
| 1 | +# Copyright (c) 2014, The MITRE Corporation. All rights reserved. |
| 2 | +# See LICENSE.txt for complete terms. |
2 | 3 |
|
| 4 | +from os.path import abspath, dirname, join |
3 | 5 | from setuptools import setup, find_packages |
4 | 6 |
|
| 7 | +INIT_FILE = join(dirname(abspath(__file__)), 'maec', '__init__.py') |
| 8 | + |
| 9 | +def get_version(): |
| 10 | + with open(INIT_FILE) as f: |
| 11 | + for line in f.readlines(): |
| 12 | + if line.startswith("__version__"): |
| 13 | + version = line.split()[-1].strip('"') |
| 14 | + return version |
| 15 | + raise AttributeError("Package does not have a __version__") |
| 16 | + |
| 17 | +with open('README.rst') as f: |
| 18 | + readme = f.read() |
| 19 | + |
5 | 20 | setup( |
6 | 21 | name="maec", |
7 | | - version=maec.__version__, |
| 22 | + version=get_version(), |
8 | 23 | author="MAEC Project", |
9 | 24 | |
10 | 25 | description="An API for parsing and creating MAEC content.", |
| 26 | + long_description=readme, |
11 | 27 | url="http://maec.mitre.org", |
12 | 28 | packages=find_packages(), |
13 | | - install_requires=['lxml>=2.3','cybox>=2.1.0.0,<2.2.0.0'] |
| 29 | + install_requires=['lxml>=2.3', 'cybox>=2.1.0.0,<2.1.1.0'], |
| 30 | + classifiers=[ |
| 31 | + "Programming Language :: Python", |
| 32 | + "Development Status :: 4 - Beta", |
| 33 | + "Intended Audience :: Developers", |
| 34 | + "License :: OSI Approved :: BSD License", |
| 35 | + "Operating System :: OS Independent", |
| 36 | + ] |
14 | 37 | ) |
0 commit comments