mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
support egg-link format when installed from git repo
If you run `python setup.py install` from the git repo, then it will be installed using the .egg-link format, which just points to the git repo. `fdroid init` needs to handle that when looking for example files to copy.
This commit is contained in:
parent
45ffaac3f2
commit
a020625462
@ -70,6 +70,12 @@ def main():
|
||||
# find root install prefix
|
||||
tmp = os.path.dirname(sys.argv[0])
|
||||
if os.path.basename(tmp) == 'bin':
|
||||
prefix = None
|
||||
egg_link = os.path.join(tmp, '..', 'local/lib/python2.7/site-packages/fdroidserver.egg-link')
|
||||
if os.path.exists(egg_link):
|
||||
# installed from local git repo
|
||||
examplesdir = os.path.join(open(egg_link).readline().rstrip(), 'examples')
|
||||
else:
|
||||
prefix = os.path.dirname(os.path.dirname(__file__)) # use .egg layout
|
||||
if not prefix.endswith('.egg'): # use UNIX layout
|
||||
prefix = os.path.dirname(tmp)
|
||||
|
Loading…
Reference in New Issue
Block a user