mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
fix egg-link and easy_install support for Python3
Wow, this is hacky and weird, but its been there for a long time. I don't know if its even relevant anymore, but is isolated so it shouldn't hurt anything. Plus there is a test for it in tests/complete-ci-tests, so it seems worth fixing.
This commit is contained in:
parent
cc6d867423
commit
4ff50e9099
@ -8,6 +8,7 @@ import sys
|
||||
# support running straight from git and standard installs
|
||||
rootpaths = [
|
||||
os.path.realpath(os.path.join(os.path.dirname(__file__), '..')),
|
||||
os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', 'share')),
|
||||
os.path.join(sys.prefix, 'share'),
|
||||
]
|
||||
|
||||
|
@ -69,10 +69,11 @@ def main():
|
||||
tmp = os.path.dirname(sys.argv[0])
|
||||
examplesdir = None
|
||||
if os.path.basename(tmp) == 'bin':
|
||||
egg_link = os.path.join(tmp, '..', 'local/lib/python2.7/site-packages/fdroidserver.egg-link')
|
||||
if os.path.exists(egg_link):
|
||||
egg_links = glob.glob(os.path.join(tmp, '..',
|
||||
'local/lib/python3.*/site-packages/fdroidserver.egg-link'))
|
||||
if egg_links:
|
||||
# installed from local git repo
|
||||
examplesdir = os.path.join(open(egg_link).readline().rstrip(), 'examples')
|
||||
examplesdir = os.path.join(open(egg_links[0]).readline().rstrip(), 'examples')
|
||||
else:
|
||||
# try .egg layout
|
||||
examplesdir = os.path.dirname(os.path.dirname(__file__)) + '/share/doc/fdroidserver/examples'
|
||||
|
Loading…
Reference in New Issue
Block a user