mirror of
https://github.com/netinvent/npbackup.git
synced 2024-11-10 09:03:02 +08:00
Update setup.py for new NPBackup v3
This commit is contained in:
parent
f7c2c99c42
commit
c4eb586b43
2 changed files with 13 additions and 6 deletions
|
@ -12,5 +12,9 @@ __license__ = "GPL-3.0-only"
|
||||||
from npbackup.gui.__main__ import main_gui
|
from npbackup.gui.__main__ import main_gui
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def viewer_gui():
|
||||||
main_gui(viewer_mode=True)
|
main_gui(viewer_mode=True)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
viewer_gui()
|
||||||
|
|
13
setup.py
13
setup.py
|
@ -8,8 +8,8 @@ __intname__ = "npbackup.setup"
|
||||||
__author__ = "Orsiris de Jong"
|
__author__ = "Orsiris de Jong"
|
||||||
__copyright__ = "Copyright (C) 2022-2024 NetInvent"
|
__copyright__ = "Copyright (C) 2022-2024 NetInvent"
|
||||||
__license__ = "GPL-3.0-only"
|
__license__ = "GPL-3.0-only"
|
||||||
__build__ = "2023012901"
|
__build__ = "2024060401"
|
||||||
__setup_ver__ = "1.1.0"
|
__setup_ver__ = "1.2.0"
|
||||||
|
|
||||||
|
|
||||||
PACKAGE_NAME = "npbackup"
|
PACKAGE_NAME = "npbackup"
|
||||||
|
@ -88,7 +88,7 @@ class BinaryDistribution(setuptools.Distribution):
|
||||||
|
|
||||||
package_path = os.path.abspath(PACKAGE_NAME)
|
package_path = os.path.abspath(PACKAGE_NAME)
|
||||||
for path in ["__main__.py", PACKAGE_NAME + ".py"]:
|
for path in ["__main__.py", PACKAGE_NAME + ".py"]:
|
||||||
package_file = os.path.join(package_path, "__main__.py")
|
package_file = os.path.join(package_path, "__version__.py")
|
||||||
if os.path.isfile(package_file):
|
if os.path.isfile(package_file):
|
||||||
break
|
break
|
||||||
metadata = get_metadata(package_file)
|
metadata = get_metadata(package_file)
|
||||||
|
@ -98,11 +98,14 @@ long_description = _read_file("README.md")
|
||||||
package_data = {"": ["translations/*.yml"]}
|
package_data = {"": ["translations/*.yml"]}
|
||||||
|
|
||||||
# if os.name == "nt":
|
# if os.name == "nt":
|
||||||
scripts = ["misc/npbackup.cmd"]
|
scripts = ["misc/npbackup-cli.cmd"]
|
||||||
# console_scripts = []
|
# console_scripts = []
|
||||||
# else:
|
# else:
|
||||||
# scripts = []
|
# scripts = []
|
||||||
console_scripts = ["npbackup = npbackup.__main__:main"]
|
console_scripts = [
|
||||||
|
"npbackup-cli = npbackup.__main__:main",
|
||||||
|
"npbackup-gui = npbackup.gui.__main__:main_gui",
|
||||||
|
"npbackup-viewer = npbackup.gui.viewer:viewer_gui",]
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name=PACKAGE_NAME,
|
name=PACKAGE_NAME,
|
||||||
|
|
Loading…
Reference in a new issue