Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b0ee6e3

Browse files
committed
Update setup.py
- Don't require importing the MAEC package. - Add classifiers and long-description. - Restrict CybOX version.
1 parent 807c143 commit b0ee6e3

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

setup.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1-
import maec
1+
# Copyright (c) 2014, The MITRE Corporation. All rights reserved.
2+
# See LICENSE.txt for complete terms.
23

4+
from os.path import abspath, dirname, join
35
from setuptools import setup, find_packages
46

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+
520
setup(
621
name="maec",
7-
version=maec.__version__,
22+
version=get_version(),
823
author="MAEC Project",
924
author_email="[email protected]",
1025
description="An API for parsing and creating MAEC content.",
26+
long_description=readme,
1127
url="http://maec.mitre.org",
1228
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+
]
1437
)

0 commit comments

Comments
 (0)