mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Trying to get correct install package
This commit is contained in:
@@ -4,6 +4,9 @@ from gi.repository import Gtk, GObject
|
|||||||
from ivolution.gui import IvolutionWindow
|
from ivolution.gui import IvolutionWindow
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
print "Script"
|
||||||
|
print os.getcwd()
|
||||||
my_app = IvolutionWindow.IvolutionWindow("Ivolution")
|
my_app = IvolutionWindow.IvolutionWindow("Ivolution")
|
||||||
GObject.threads_init()
|
GObject.threads_init()
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
recursive-include log *
|
recursive-include log *
|
||||||
recursive-include bin *
|
recursive-include doc/build *
|
||||||
recursive-include docs *
|
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include README*
|
include README*
|
||||||
include AUTHORS
|
include AUTHORS
|
||||||
include CHANGES
|
include CHANGES
|
||||||
|
recursive-include ivolution/data/haarcascades *
|
||||||
|
recursive-include ivolution/data/samples *
|
||||||
|
recursive-include ivolution/data/ui *
|
||||||
|
recursive-include ivolution/data/media *
|
||||||
0
ivolution/data/__init__.py
Normal file
0
ivolution/data/__init__.py
Normal file
0
ivolution/data/media/__init__.py
Normal file
0
ivolution/data/media/__init__.py
Normal file
0
ivolution/data/samples/__init__.py
Normal file
0
ivolution/data/samples/__init__.py
Normal file
0
ivolution/data/ui/__init__.py
Normal file
0
ivolution/data/ui/__init__.py
Normal file
@@ -28,6 +28,8 @@ class IvolutionWindow(FacemovieThread.Observer, FacemovieThread.Observable):
|
|||||||
self.my_logger = None
|
self.my_logger = None
|
||||||
self.console_logger = None
|
self.console_logger = None
|
||||||
|
|
||||||
|
print "GUI"
|
||||||
|
print os.getcwd()
|
||||||
self.builder = Gtk.Builder()
|
self.builder = Gtk.Builder()
|
||||||
self.builder.add_from_file("ivolution/data/ui/IvolutionWindow.glade")
|
self.builder.add_from_file("ivolution/data/ui/IvolutionWindow.glade")
|
||||||
#self.builder.connect_signals({ "on_ivolutionwindow_destroy" : Gtk.main_quit })
|
#self.builder.connect_signals({ "on_ivolutionwindow_destroy" : Gtk.main_quit })
|
||||||
@@ -190,10 +192,15 @@ class IvolutionWindow(FacemovieThread.Observer, FacemovieThread.Observable):
|
|||||||
Start logging in file here
|
Start logging in file here
|
||||||
"""
|
"""
|
||||||
# create logger for 'facemovie'
|
# create logger for 'facemovie'
|
||||||
self.my_logger = logging.getLogger('FileLog')
|
#self.my_logger = logging.getLogger('FileLog')
|
||||||
|
self.my_logger = logging.getLogger('ConsoleLog')
|
||||||
|
|
||||||
self.my_logger.setLevel(logging.DEBUG)
|
self.my_logger.setLevel(logging.DEBUG)
|
||||||
# create file handler which logs even debug messages
|
# create file handler which logs even debug messages
|
||||||
fh = logging.FileHandler('log/fm.log')
|
|
||||||
|
fh = logging.StreamHandler()
|
||||||
|
#fh = logging.FileHandler('log/fm.log')
|
||||||
|
|
||||||
fh.setLevel(logging.DEBUG)
|
fh.setLevel(logging.DEBUG)
|
||||||
# create console handler with a higher log level
|
# create console handler with a higher log level
|
||||||
self.console_logger = logging.getLogger('ConsoleLog')
|
self.console_logger = logging.getLogger('ConsoleLog')
|
||||||
|
|||||||
42
setup.py
42
setup.py
@@ -5,47 +5,12 @@ Created on 19 avr. 2012
|
|||||||
'''
|
'''
|
||||||
# creating executable here
|
# creating executable here
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import glob
|
|
||||||
|
|
||||||
import facemovie
|
|
||||||
|
|
||||||
def find_data_files(source,target,patterns):
|
|
||||||
"""Locates the specified data-files and returns the matches
|
|
||||||
in a data_files compatible format.
|
|
||||||
|
|
||||||
source is the root of the source data tree.
|
|
||||||
Use '' or '.' for current directory.
|
|
||||||
target is the root of the target data tree.
|
|
||||||
Use '' or '.' for the distribution directory.
|
|
||||||
patterns is a sequence of glob-patterns for the
|
|
||||||
files you want to copy.
|
|
||||||
"""
|
|
||||||
if glob.has_magic(source) or glob.has_magic(target):
|
|
||||||
raise ValueError("Magic not allowed in src, target")
|
|
||||||
ret = {}l
|
|
||||||
for pattern in patterns:
|
|
||||||
pattern = os.path.join(source,pattern)
|
|
||||||
for filename in glob.glob(pattern):
|
|
||||||
if os.path.isfile(filename):
|
|
||||||
targetpath = os.path.join(target,os.path.relpath(filename,source))
|
|
||||||
path = os.path.dirname(targetpath)
|
|
||||||
ret.setdefault(path,[]).append(filename)
|
|
||||||
return sorted(ret.items())
|
|
||||||
|
|
||||||
# Utility function to read the README file.
|
# Utility function to read the README file.
|
||||||
def read(fname):
|
def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
|
|
||||||
#haar_files = find_data_files('facemovie','',['haarcascades/*.xml'])
|
|
||||||
|
|
||||||
setup(...,
|
|
||||||
packages=['mypkg'],
|
|
||||||
package_dir={'mypkg': 'src/mypkg'},
|
|
||||||
package_data={'mypkg': ['data/*.dat']},
|
|
||||||
)
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = "Ivolution",
|
name = "Ivolution",
|
||||||
version = "1.0",
|
version = "1.0",
|
||||||
@@ -56,7 +21,7 @@ setup(
|
|||||||
keywords = "image_processing computer_vision one_picture_a_day photography",
|
keywords = "image_processing computer_vision one_picture_a_day photography",
|
||||||
url = "http://jlengrand.github.com/FaceMovie/",
|
url = "http://jlengrand.github.com/FaceMovie/",
|
||||||
download_url = "http://jlengrand.github.com/FaceMovie/",
|
download_url = "http://jlengrand.github.com/FaceMovie/",
|
||||||
packages=['ivolution', 'ivolution.util', 'ivolution.gui'],
|
packages=['ivolution', 'ivolution.util', 'ivolution.gui', 'ivolution.data'],
|
||||||
long_description=read('README.markdown'),
|
long_description=read('README.markdown'),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 3 - Alpha",
|
||||||
@@ -70,6 +35,7 @@ setup(
|
|||||||
],
|
],
|
||||||
#data_files = data_files,
|
#data_files = data_files,
|
||||||
scripts=['Ivolution.py', 'Facemoviefier.py'],
|
scripts=['Ivolution.py', 'Facemoviefier.py'],
|
||||||
package_dir={'data' : 'ivolution/data'},
|
package_dir={'ivolution.data' : 'ivolution/data'},
|
||||||
package_data={'data' : ['haarcascades/*.xml'], 'data' : ['samples/*'], 'data' : ['ui/*'], 'data' : ['media/*']}
|
#package_data={'ivolution.data' : ['haarcascades/*'], 'ivolution.data' : ['samples/*'], 'ivolution.data' : ['ui/*'], 'ivolution.media' : ['media/*']}
|
||||||
|
package_data={'ivolution.data' : ['haarcascades/*', 'samples/*', 'ui/*', 'media/*']}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user