Add basic Windows exe setup.py
parent
0e3fe3ffa4
commit
b69d0b55e9
58
setup.py
58
setup.py
|
@ -1,20 +1,68 @@
|
|||
import distutils, distutils.util
|
||||
import os
|
||||
import setuptools
|
||||
|
||||
import lokrez, lokrez.version
|
||||
|
||||
if os.name == "nt":
|
||||
import cx_Freeze
|
||||
|
||||
author = "Lertsenem"
|
||||
mail = "lertsenem@lertsenem.com"
|
||||
|
||||
# Load README for long_description
|
||||
with open("README.adoc", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setuptools.setup(
|
||||
if os.name == "nt":
|
||||
enterprise = "Smash@Lyon"
|
||||
arch = distutils.util.get_platform().split("-")[-1]
|
||||
build_exe_options = {
|
||||
"packages": ["os"],
|
||||
"include_msvcr": True,
|
||||
}
|
||||
bdist_msi_options = {
|
||||
"upgrade_code": "{123456789-1337-8483-ABCD-DEADBEEFCAFE}",
|
||||
"add_to_path": True,
|
||||
"initial_target_dir": r"[LocalAppDataFolder]\{}\{}" \
|
||||
.format(
|
||||
enterprise,
|
||||
lokrez.version.NAME,
|
||||
),
|
||||
}
|
||||
|
||||
options = {
|
||||
"build_exe": build_exe_options,
|
||||
"bdist_msi": bdist_msi_options,
|
||||
},
|
||||
|
||||
base = None
|
||||
|
||||
executables = [
|
||||
cx_Freeze.Executable(
|
||||
script = "__init__.py",
|
||||
targetName = "{}.exe".format(lokrez.version.NAME),
|
||||
base = base,
|
||||
)
|
||||
],
|
||||
|
||||
setup = cx_Freeze.setup
|
||||
|
||||
else:
|
||||
options = None
|
||||
executables = None
|
||||
setup = setuptools.setup
|
||||
|
||||
setup(
|
||||
name = lokrez.version.NAME,
|
||||
version = lokrez.__version__,
|
||||
author = "Lertsenem",
|
||||
author_email = "lertsenem@lertsenem.com",
|
||||
author = author,
|
||||
author_email = mail,
|
||||
description = "A smash.gg-connected local results generator for SSBU",
|
||||
long_description = long_description,
|
||||
long_description_content_type = "text/asciidoc",
|
||||
url = "https://git.lertsenem.com/lertsenem/ssbu_lokrez",
|
||||
packages = setuptools.find_packages(),
|
||||
packages = ["lokrez"],
|
||||
install_requires = [
|
||||
"jinja2",
|
||||
"requests",
|
||||
|
@ -41,4 +89,6 @@ setuptools.setup(
|
|||
"lokrez = lokrez:main",
|
||||
],
|
||||
},
|
||||
options = options,
|
||||
executables = executables,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue