Remove runtime dependency on setuptools
We were only depending on setuptools for runtime to use pkg_resources, so we could fetch the path to the rst documentation in certain cases (mainly during development). We can figure out that path using other means, so we do not depend on setuptools anymore. Closes-Bug: #1713950 Change-Id: I9c0f676ac2219001118f7191a6e5c8faee3312c4
This commit is contained in:
parent
3fadea0a99
commit
1948987952
|
@ -18,10 +18,10 @@ This module provides all the predefined variables.
|
|||
|
||||
import datetime
|
||||
import os
|
||||
import pkg_resources
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import packstack
|
||||
from .utils import get_current_user
|
||||
|
||||
|
||||
|
@ -29,8 +29,10 @@ APP_NAME = "Packstack"
|
|||
|
||||
FILE_YUM_VERSION_LOCK = "/etc/yum/pluginconf.d/versionlock.list"
|
||||
|
||||
PACKSTACK_SRC_DOC = pkg_resources.resource_filename(
|
||||
pkg_resources.Requirement.parse('packstack'), 'docs/packstack.rst'
|
||||
PACKSTACK_SRC_DOC = os.path.realpath(
|
||||
os.path.join(os.path.abspath(
|
||||
packstack.__path__[0]), '..', 'docs/packstack.rst'
|
||||
)
|
||||
)
|
||||
if os.path.exists(PACKSTACK_SRC_DOC):
|
||||
PACKSTACK_DOC = PACKSTACK_SRC_DOC
|
||||
|
|
Loading…
Reference in New Issue