Skip to content

Commit

Permalink
Initial solution for #66. Needs to be tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroautalan committed Jun 4, 2016
1 parent b1f1c30 commit 8b6f110
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 0 additions & 4 deletions bin/pygubu-designer
Expand Up @@ -39,9 +39,5 @@ except ImportError as e:

from pygubudesigner import main

# first of all, show the versions
print("python version: {0} on {1}".format(platform.python_version(), sys.platform))
print("pygubu version: {0}".format(pygubu.__version__))

main.start_pygubu()

5 changes: 0 additions & 5 deletions pygubudesigner/__main__.py
@@ -1,10 +1,5 @@
import platform
import sys
import pygubu
from pygubudesigner import main

if __name__ == '__main__':
# first of all, show the versions
print("python version: {0} on {1}".format(platform.python_version(), sys.platform))
print("pygubu version: {0}".format(pygubu.__version__))
main.start_pygubu()
5 changes: 5 additions & 0 deletions pygubudesigner/main.py
Expand Up @@ -19,6 +19,8 @@
# For further info, check http://pygubu.web.here

from __future__ import unicode_literals
from __future__ import print_function
import platform
import os
import sys
import logging
Expand Down Expand Up @@ -528,6 +530,9 @@ def _edit_preferences(self):


def start_pygubu():
print("python version: {0} on {1}".format(
platform.python_version(), sys.platform))
print("pygubu version: {0}".format(pygubu.__version__))
root = tk.Tk()
root.withdraw()
app = PygubuUI(root)
Expand Down
15 changes: 9 additions & 6 deletions setup.py
Expand Up @@ -39,13 +39,11 @@ def run(self):
if os.path.exists(filename):
os.remove(filename)
#
# Create .bat file on windows
# Remove old pygubu-designer.bat
if platform.system() == 'Windows':
spath = os.path.join(self.install_scripts, 'pygubu-designer.bat')
batfilename = 'pygubu-designer.bat'
batpath = os.path.join(self.install_scripts, batfilename)
with open(batpath, 'w') as batfile:
content = "{0} -m pygubudesigner".format(sys.executable)
batfile.write(content)



long_description = \
Expand Down Expand Up @@ -127,7 +125,12 @@ def __init__(self, master):
'ui/*.ui',
'locale/*/*/*.mo'],
},
scripts=["bin/pygubu-designer"],
# scripts=["bin/pygubu-designer"],
entry_points={
'gui_scripts': [
'pygubu-designer = pygubudesigner.main:start_pygubu',
]
},
cmdclass={
'install': CustomInstall,
},
Expand Down

0 comments on commit 8b6f110

Please sign in to comment.