Skip to content

Commit d86f985

Browse files
authored
Merge pull request #95 from emmanvg/test-harness
update project test harness and requirements
2 parents b1f5adf + 34ecc99 commit d86f985

File tree

4 files changed

+32
-21
lines changed

4 files changed

+32
-21
lines changed

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
language: python
2-
2+
sudo: false # Since this is an older project, this is not the default.
3+
cache: pip
4+
dist: xenial
35
python:
46
- "2.7"
57
- "3.4"
68
- "3.5"
79
- "3.6"
8-
10+
- "3.7"
911
install:
10-
- pip install -U tox-travis
11-
12+
- pip install -U pip setuptools
13+
- pip install tox-travis
1214
script:
1315
- tox
14-
1516
notifications:
1617
email:
1718

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bdist_wheel]
2+
universal = True

setup.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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+
77
from os.path import abspath, dirname, join
88

99

@@ -12,6 +12,7 @@
1212
BASE_DIR = dirname(abspath(__file__))
1313
VERSION_FILE = join(BASE_DIR, 'maec', 'version.py')
1414

15+
1516
def 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

2830
install_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

3437
extras_require = {
@@ -48,18 +51,20 @@ def get_version():
4851
author="MAEC Project",
4952
author_email="[email protected]",
5053
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",

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
[tox]
2-
envlist = py27,py34,py35,py36
2+
envlist = py27,py34,py35,py36,py37
33

44
[testenv]
55
commands =
66
nosetests maec
7-
sphinx-build -b doctest docs docs/_build/doctest
8-
sphinx-build -b html docs docs/_build/html
97
deps =
108
-rrequirements.txt
119

10+
[testenv:docs]
11+
commands =
12+
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs {envtmpdir}/doctest
13+
sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
1214

1315
[travis]
1416
python =
1517
2.7: py27
1618
3.4: py34
1719
3.5: py35
1820
3.6: py36
21+
3.7: py37

0 commit comments

Comments
 (0)