Skip to content

Commit 55f66f8

Browse files
authored
do not allow install with old pytest adaptor (fixes #57 via #65)
1 parent f914358 commit 55f66f8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

allure-pytest/setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
import os
1+
import os,sys
22
from setuptools import setup
3+
from pkg_resources import require, DistributionNotFound, VersionConflict
4+
5+
try:
6+
require('pytest-allure-adaptor')
7+
print("""
8+
You have pytest-allure-adaptor installed.
9+
You need to remove pytest-allure-adaptor from your site-packages
10+
before installing allure-pytest, or conflicts may result.
11+
""")
12+
sys.exit()
13+
except (DistributionNotFound, VersionConflict):
14+
pass
315

416
PACKAGE = "allure-pytest"
517
VERSION = "2.0.0b2"

0 commit comments

Comments
 (0)