diff --git a/.travis.yml b/.travis.yml index b9dd3b7e..0ed2abc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ dist: xenial matrix: include: - - python: 3.5 - env: - - TOX_ENV=py35 - python: 3.6 env: - TOX_ENV=py36 diff --git a/setup.py b/setup.py index 98377d5d..ef918784 100755 --- a/setup.py +++ b/setup.py @@ -17,14 +17,20 @@ def read(fname): # On Python 3, we can't "from hamcrest import __version__" (get ImportError), # so we extract the variable assignment and execute it ourselves. fh = open("src/hamcrest/__init__.py") + +# this will be overridden +__version__ = None try: for line in fh: if re.match("__version__.*", line): exec(line) + finally: if fh: fh.close() +assert __version__ is not None + params = dict( name="PyHamcrest", version=__version__, # flake8:noqa @@ -52,7 +58,6 @@ def read(fname): "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8",