-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
38 lines (30 loc) · 1.17 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import pip
import stepic_pytest
pip_major_version = int(pip.__version__.split(".")[0])
if pip_major_version >= 20:
from pip._internal.req import parse_requirements
from pip._internal.network.session import PipSession
elif pip_major_version >= 10:
from pip._internal.req import parse_requirements
from pip._internal.download import PipSession
else:
from pip.req import parse_requirements
from pip.download import PipSession
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
requirements_base = parse_requirements('requirements/base.txt', session=PipSession())
install_requires = [str(req.req) for req in requirements_base]
setup(
name='stepic-pytest',
version=stepic_pytest.__version__,
packages=['stepic_pytest'],
install_requires=install_requires,
author='Stepic Team',
description="Test scenario runner for Stepic admin quiz",
long_description=README,
url='https://stepic.org',
entry_points={'pytest11': ['stepic = stepic_pytest.plugin']},
)