Assume developers are using virtualenvs

If this is true, we don't have to mess with sys.path or provide a
"convenience" launcher anymore.
This commit is contained in:
Tobias Gruetzmacher 2020-10-01 14:11:11 +02:00
parent 7c2c9c3778
commit d06e642b56
6 changed files with 10 additions and 33 deletions

17
dosage
View file

@ -1,17 +0,0 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2018 Tobias Gruetzmacher
# ___
# / \___ ___ __ _ __ _ ___
# / /\ / _ \/ __|/ _` |/ _` |/ _ \
# / /_// (_) \__ \ (_| | (_| | __/
# /___,' \___/|___/\__,_|\__, |\___|
# |___/
import sys
from dosagelib.cmd import main
if __name__ == '__main__':
sys.exit(main())

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
# Copyright (C) 2015-2020 Tobias Gruetzmacher
"""
Creates a CBZ file in the comic directory.
Uses an ordered symlink directory (see order-symlinks.py) if it exists,
@ -13,7 +13,6 @@ import sys
import os
import zipfile
sys.path.append(os.path.join(os.path.dirname(__file__), "..")) # noqa
from dosagelib.configuration import App

View file

@ -1,21 +1,18 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2018 Tobias Gruetzmacher
# Copyright (C) 2015-2020 Tobias Gruetzmacher
'''update languages.py from pycountry'''
import os
import sys
import codecs
basepath = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, basepath)
from dosagelib.scraper import get_scrapers # noqa
from dosagelib.scraper import get_scrapers
def main():
"""Update language information in dosagelib/languages.py."""
basepath = os.path.dirname(os.path.dirname(__file__))
fn = os.path.join(basepath, 'dosagelib', 'languages.py')
with codecs.open(fn, 'w', 'utf-8') as f:
f.write('# SPDX-License-Identifier: MIT\n')
@ -34,11 +31,11 @@ def get_used_languages():
return languages
def write_languages(f, l):
def write_languages(f, lang):
"""Write language information."""
f.write("Languages = {%s" % os.linesep)
for lang in sorted(l):
f.write(" %r: %r,%s" % (lang, l[lang], os.linesep))
for lang in sorted(lang):
f.write(" %r: %r,%s" % (lang, lang[lang], os.linesep))
f.write("}%s" % os.linesep)

View file

@ -12,8 +12,6 @@ import time
import lxml
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) # noqa
from dosagelib.util import get_page
from dosagelib import scraper, http

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (C) 2019-2020 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring