Skip to content

Commit e0e65ec

Browse files
committed
[setup] Add <Py36 install warnings
1 parent bdfb38a commit e0e65ec

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import json
22
import os
33

4+
from sys import version_info as _python_version
5+
46
try:
57
from setuptools import setup
68
except ImportError as ex:
@@ -34,7 +36,7 @@
3436
install_req = ["lxml", "pyyaml>=5.1", "rdflib==5.0.0", "docopt", "pathlib", "pyparsing==2.4.7"]
3537

3638
# owlrl depends on rdflib - the pinned version should be removed once the version pin has also been
37-
# removed from rdflib.
39+
# removed from rdflib. Also needs to be updated in requirements-test.txt
3840
tests_req = ["pytest", "owlrl==5.2.3", "requests"]
3941

4042
setup(
@@ -58,3 +60,13 @@
5860
'odmlconvert=odml.scripts.odml_convert:main',
5961
'odmlview=odml.scripts.odml_view:main']}
6062
)
63+
64+
# Make this the last thing people read after a setup.py install
65+
if _python_version.major < 3:
66+
msg = "\n\nPython 2 has been deprecated.\n"
67+
msg += "\todML support for Python 2 will be dropped August 2020."
68+
print(msg)
69+
elif _python_version.major == 3 and _python_version.minor < 6:
70+
msg = "\n\nThis package is not tested with your Python version. "
71+
msg += "\n\tPlease consider upgrading to the latest Python distribution."
72+
print(msg)

0 commit comments

Comments
 (0)