From 2fa0016ae968b50f8788ca7c3818b1767c2f4388 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Thu, 30 Dec 2021 19:27:04 +0000 Subject: [PATCH] Remove Portable Building portable removed in: e3ab9024 ("Remove platform-specific installer stuff and ensure a build .whl wheel file can be built.", 2016-01-17) --- .gitignore | 1 - linkcheck/configuration/__init__.py | 9 ++++----- setup.py | 6 ------ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 7ec80d87..487cd874 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ Changelog.linkchecker* /doc/html/*.qch /.achievements /doc/i18n/locales/*/LC_MESSAGES/*.mo -/LinkChecker-*-portable.zip /LinkChecker-*.exe /LinkChecker.egg-info /todo diff --git a/linkcheck/configuration/__init__.py b/linkcheck/configuration/__init__.py index 8b688c5a..f2efb18d 100644 --- a/linkcheck/configuration/__init__.py +++ b/linkcheck/configuration/__init__.py @@ -46,7 +46,6 @@ Freeware = ( This is free software, and you are welcome to redistribute it under certain conditions. Look at the file `LICENSE' within this distribution.""" ) -Portable = configdata.portable def normpath(path): @@ -364,7 +363,7 @@ def get_plugin_folders(): exist.""" folders = [] defaultfolder = os.path.join(get_user_data(), "plugins") - if not os.path.exists(defaultfolder) and not Portable: + if not os.path.exists(defaultfolder): try: make_userdir(defaultfolder) except Exception as errmsg: @@ -390,9 +389,9 @@ def make_userdir(child): def get_user_config(): """Get the user configuration filename. If the user configuration file does not exist, copy it from the initial - configuration file, but only if this is not a portable installation. + configuration file. Returns path to user config file (which might not exist due to copy - failures or on portable systems). + failures). @return configuration filename @rtype string """ @@ -405,7 +404,7 @@ def get_user_config(): if os.path.isfile(homedotfile) else os.path.join(xdg_config_home, "linkchecker", "linkcheckerrc") ) - if os.path.isfile(initialconf) and not os.path.exists(userconf) and not Portable: + if os.path.isfile(initialconf) and not os.path.exists(userconf): # copy the initial configuration to the user configuration try: make_userdir(userconf) diff --git a/setup.py b/setup.py index b5f9d271..09816d42 100755 --- a/setup.py +++ b/setup.py @@ -106,11 +106,6 @@ def get_release_date(for_sdist=False): return release_date -def get_portable(): - """Return portable flag as string.""" - return os.environ.get("LINKCHECKER_PORTABLE", "0") - - class MySdist(sdist): def run(self): Path(RELEASE_DATE_FILE).write_text(get_release_date(for_sdist=True)) @@ -258,7 +253,6 @@ class MyDistribution(Distribution): cmd = "%s = %r" % (name, val) data.append(cmd) data.append('release_date = "%s"' % get_release_date()) - data.append("portable = %s" % get_portable()) # write the config file util.execute( write_file,