mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-05-16 00:33:09 +00:00
Merge branch 'master' of https://github.com/adi-/django-markdownx
* 'master' of https://github.com/adi-/django-markdownx: __init__ import altered.
This commit is contained in:
commit
d86f71ac5f
1 changed files with 5 additions and 6 deletions
11
setup.py
11
setup.py
|
|
@ -63,16 +63,16 @@ def get_meta():
|
|||
path = join(dirname(__file__), 'markdownx', '__init__.py')
|
||||
|
||||
if version_info.major == 3 and version_info.minor >= 5:
|
||||
import importlib.util
|
||||
spec = importlib.util.spec_from_file_location('.', path)
|
||||
mod = importlib.util.module_from_spec(spec)
|
||||
from importlib.util import spec_from_file_location, module_from_spec
|
||||
spec = spec_from_file_location('.', path)
|
||||
mod = module_from_spec(spec)
|
||||
spec.loader.exec_module(mod)
|
||||
elif version_info.major == 3:
|
||||
from importlib.machinery import SourceFileLoader
|
||||
mod = SourceFileLoader('.', path).load_module()
|
||||
else:
|
||||
import imp
|
||||
mod = imp.load_source('.', path)
|
||||
from imp import load_source
|
||||
mod = load_source('.', path)
|
||||
|
||||
meta = {key.replace('__', ''): getattr(mod, key) for key in keys}
|
||||
|
||||
|
|
@ -130,5 +130,4 @@ setup(
|
|||
tests_require=get_requirements(),
|
||||
test_suite='runtests',
|
||||
install_requires=get_requirements(),
|
||||
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue