Skip to content

Commit 169786d

Browse files
committed
feat: prevent python3-pip installation until py3 is supported
1 parent 2ff1a04 commit 169786d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
SETUP_DIR = os.path.dirname(__file__)
99
README = os.path.join(SETUP_DIR, 'README.rst')
1010

11+
# if python3 runtime and `setup.py install` is called
12+
if sys.version_info.major == 3 and sys.argv[1] == 'install':
13+
print("Aborting installation. CWL Tool doesn't support Python 3 currently.")
14+
print("Install using Python 2 pip.")
15+
exit(1)
16+
1117
try:
1218
import gittaggers
1319

@@ -64,4 +70,10 @@
6470
},
6571
zip_safe=True,
6672
cmdclass={'egg_info': tagger},
73+
classifiers=[
74+
'Development Status :: 5 - Production/Stable',
75+
'Operating System :: POSIX',
76+
'Operating System :: OS Independent',
77+
'Programming Language :: Python :: 2 :: Only',
78+
]
6779
)

0 commit comments

Comments
 (0)