-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
61 lines (54 loc) · 1.7 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""
Setup file for eox-tenant Django plugin.
"""
import os
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst', 'r') as fh:
README = fh.read()
def get_version():
"""
Retrives the version string from __init__.py.
"""
file_path = os.path.join('eox_tenant', '__init__.py')
initfile_lines = open(file_path, 'rt').readlines()
version_regex = r"^__version__ = ['\"]([^'\"]*)['\"]"
for line in initfile_lines:
match_string = re.search(version_regex, line, re.M)
if match_string:
return match_string.group(1)
raise RuntimeError(f'Unable to find version string in {file_path}.')
setup(
name='eox-tenant',
version=get_version(),
description='Edunext Open edx extensions tenant.',
author='eduNEXT',
author_email='[email protected]',
long_description=README,
long_description_content_type='text/x-rst',
packages=['eox_tenant'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
],
license='AGPL',
zip_safe=False,
install_requires=[],
include_package_data=True,
entry_points={
"lms.djangoapp": [
"eox_tenant = eox_tenant.apps:EdunextOpenedxExtensionsTenantConfig"
],
"cms.djangoapp": [
"eox_tenant = eox_tenant.apps:EdunextOpenedxExtensionsTenantConfig"
],
}
)