mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Enable creating a binary with PyOxidizer
With PyOxidizer 0.18.0 AppName in setup.py has to be changed to the all lower case "linkchecker". Application translations do not work. better_exchook2.fallback_findfile() may still need converting, first needs a test.
This commit is contained in:
parent
5768b76f6c
commit
141a811ba6
4 changed files with 22 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ include Dockerfile
|
||||||
include MANIFEST.in
|
include MANIFEST.in
|
||||||
include Makefile
|
include Makefile
|
||||||
include install-rpm.sh
|
include install-rpm.sh
|
||||||
|
include pyoxidizer.bzl
|
||||||
include .project
|
include .project
|
||||||
include .pydevproject
|
include .pydevproject
|
||||||
include .yamllint
|
include .yamllint
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Create command line arguments.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from .. import checker, logconf, logger
|
from .. import checker, logconf, logger, COMMAND_NAME
|
||||||
|
|
||||||
from ..cmdline import LCArgumentParser
|
from ..cmdline import LCArgumentParser
|
||||||
|
|
||||||
|
|
@ -205,7 +205,9 @@ class ArgParser(LCArgumentParser):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
epilog=Epilog, formatter_class=argparse.RawDescriptionHelpFormatter
|
epilog=Epilog,
|
||||||
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
|
prog=COMMAND_NAME,
|
||||||
)
|
)
|
||||||
|
|
||||||
# ================== general options =====================
|
# ================== general options =====================
|
||||||
|
|
|
||||||
13
pyoxidizer.bzl
Normal file
13
pyoxidizer.bzl
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
def make_exe():
|
||||||
|
dist = default_python_distribution()
|
||||||
|
python_config = dist.make_python_interpreter_config()
|
||||||
|
python_config.run_module = "linkcheck"
|
||||||
|
exe = dist.to_python_executable(
|
||||||
|
name="linkchecker",
|
||||||
|
config=python_config,
|
||||||
|
)
|
||||||
|
exe.add_python_resources(exe.pip_install([CWD]))
|
||||||
|
return exe
|
||||||
|
|
||||||
|
register_target("exe", make_exe)
|
||||||
|
resolve_targets()
|
||||||
4
setup.py
4
setup.py
|
|
@ -47,6 +47,10 @@ else:
|
||||||
|
|
||||||
# the application name
|
# the application name
|
||||||
AppName = "LinkChecker"
|
AppName = "LinkChecker"
|
||||||
|
if "PYOXIDIZER" in os.environ:
|
||||||
|
# Name with capitals not supported by PyOxidizer 0.18.0
|
||||||
|
# https://github.com/indygreg/PyOxidizer/issues/488
|
||||||
|
AppName = AppName.lower()
|
||||||
Description = "check links in web documents or full websites"
|
Description = "check links in web documents or full websites"
|
||||||
|
|
||||||
RELEASE_DATE_FILE = "_release_date"
|
RELEASE_DATE_FILE = "_release_date"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue