Skip to content

Commit

Permalink
New structure for packaging
Browse files Browse the repository at this point in the history
Created a top-level directory and sub-directories
for build files, doc files, py modules, etc. Created an __init__.py
and a setup.py file. First step for packaging.
  • Loading branch information
jkanev committed Aug 8, 2016
1 parent ccf150e commit 04e4637
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 144 deletions.
File renamed without changes.
140 changes: 0 additions & 140 deletions items.data

This file was deleted.

15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

#!/usr/bin/env python

from distutils.core import setup

setup (
name='TreeTime',
version='0.1',
description='TreeTime is a to-do list manager, test report tool, project manager, family ancestry editor, mind-mapping tool, etc. Using TreeTime you can categorise and organise your data items in tree structures. You can define several trees at the same time, each with a different structure, but on the same data.You can use functions (calculate sums, ratios and means) recursively up the branches of a tree. ',
author='Jacob Kanev',
author_email='jkanev@zoho.com',
url='https://github.com/jkanev/treetime',
packages=['treetime'],
package_data={'treetime': ['data/items.trt', 'doc/*.png']},
)
2 changes: 2 additions & 0 deletions treetime/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

__all__ = ['item', 'tree', 'treetime']
Binary file added treetime/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added treetime/__pycache__/item.cpython-35.pyc
Binary file not shown.
Binary file added treetime/__pycache__/mainwindow.cpython-35.pyc
Binary file not shown.
Binary file added treetime/__pycache__/tree.cpython-35.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions treetime/compile-ui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import os.path
from PyQt5 import QtCore, QtGui, QtWidgets, uic

# compile ui file if necessary
if os.path.getmtime("mainwindow.py") < os.path.getmtime("mainwindow.ui"):
with open("mainwindow.py", "w") as file:
print("compiling ui")
uic.compileUi("mainwindow.ui", file)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions treetime/treetime
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
python3 treetime.py
9 changes: 5 additions & 4 deletions treetime.py → treetime/treetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,9 @@ def moveToNewParent(self, item, treeIndex, newParent):
self.writeToFile()


app = QtWidgets.QApplication(sys.argv)
mainWindow = TreeTimeWindow()
def run(self):
app = QtWidgets.QApplication(sys.argv)
mainWindow = TreeTimeWindow()

mainWindow.show()
sys.exit(app.exec_())
mainWindow.show()
sys.exit(app.exec_())

0 comments on commit 04e4637

Please sign in to comment.