33# Copyright (c) 2018 - The MITRE Corporation
44# For license information, see the LICENSE.txt file
55
6- from io import open # Allow `encoding` kwarg on Python 2.7
6+
77from os .path import abspath , dirname , join
88
99
1212BASE_DIR = dirname (abspath (__file__ ))
1313VERSION_FILE = join (BASE_DIR , 'maec' , 'version.py' )
1414
15+
1516def get_version ():
1617 with open (VERSION_FILE ) as f :
1718 for line in f .readlines ():
@@ -21,14 +22,16 @@ def get_version():
2122 raise AttributeError ("Package does not have a __version__" )
2223
2324
24- with open ('README.rst' , encoding = 'utf-8' ) as f :
25- readme = f .read ()
25+ def get_long_description ():
26+ with open ('README.rst' ) as f :
27+ return f .read ()
2628
2729
2830install_requires = [
29- 'lxml>=2.2.3' ,
30- 'mixbox>=0.0.13' ,
31- 'cybox>=2.1.0.13.dev1,<2.1.1.0' ,
31+ 'lxml>=2.2.3 ; python_version == "2.7" or python_version >= "3.5"' ,
32+ 'lxml>=2.2.3,<4.4.0 ; python_version > "2.7" and python_version < "3.5"' ,
33+ 'mixbox>=1.0.2' ,
34+ 'cybox>=2.1.0.13,<2.1.1.0' ,
3235]
3336
3437extras_require = {
@@ -48,18 +51,20 @@ def get_version():
4851 author = "MAEC Project" ,
49525053 description = "An API for parsing and creating MAEC content." ,
51- long_description = readme ,
54+ long_description = get_long_description () ,
5255 url = "http://maec.mitre.org" ,
5356 packages = find_packages (),
5457 install_requires = install_requires ,
5558 extras_require = extras_require ,
59+ license = "BSD" ,
5660 classifiers = [
57- 'Programming Language :: Python :: 2' ,
58- 'Programming Language :: Python :: 2.7' ,
59- 'Programming Language :: Python :: 3' ,
60- 'Programming Language :: Python :: 3.4' ,
61- 'Programming Language :: Python :: 3.5' ,
62- 'Programming Language :: Python :: 3.6' ,
61+ "Programming Language :: Python :: 2" ,
62+ "Programming Language :: Python :: 2.7" ,
63+ "Programming Language :: Python :: 3" ,
64+ "Programming Language :: Python :: 3.4" ,
65+ "Programming Language :: Python :: 3.5" ,
66+ "Programming Language :: Python :: 3.6" ,
67+ "Programming Language :: Python :: 3.7" ,
6368 "Development Status :: 4 - Beta" ,
6469 "Intended Audience :: Developers" ,
6570 "License :: OSI Approved :: BSD License" ,
0 commit comments