本文整理汇总了Python中matplotlib.get_py2exe_datafiles函数的典型用法代码示例。如果您正苦于以下问题:Python get_py2exe_datafiles函数的具体用法?Python get_py2exe_datafiles怎么用?Python get_py2exe_datafiles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_py2exe_datafiles函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: data_files
def data_files():
'''Build list of data files to be installed'''
files = []
if sys.platform == 'win32':
import matplotlib
datafiles = matplotlib.get_py2exe_datafiles()
if isinstance(datafiles, list):
files.extend(datafiles)
else:
files.append(datafiles)
os.chdir('bin')
for (dp, dn, names) in os.walk('share\\locale'):
files.append((dp, map(lambda x: opj('bin', dp, x), names)))
os.chdir('..')
files.append((".",["bin\\openerp.ui", "bin\\win_error.ui", 'bin\\tipoftheday.txt', 'doc\\README.txt']))
files.append(("pixmaps", glob.glob("bin\\pixmaps\\*.*")))
files.append(("po", glob.glob("bin\\po\\*.*")))
files.append(("icons", glob.glob("bin\\icons\\*.png")))
files.append(("share\\locale", glob.glob("bin\\share\\locale\\*.*")))
else:
files.append((opj('share','man','man1',''),['man/openerp-client.1']))
files.append((opj('share','doc', 'openerp-client-%s' % version), [f for
f in glob.glob('doc/*') if os.path.isfile(f)]))
files.append((opj('share', 'pixmaps', 'openerp-client'),
glob.glob('bin/pixmaps/*.png')))
files.append((opj('share', 'pixmaps', 'openerp-client', 'icons'),
glob.glob('bin/icons/*.png')))
files.append((opj('share', 'openerp-client'), ['bin/openerp.ui', 'bin/tipoftheday.txt',
'bin/win_error.ui']))
return files
开发者ID:Ichag,项目名称:openerp-client,代码行数:31,代码来源:setup.py
示例2: data_files
def data_files():
'''Build list of data files to be installed'''
files = []
if os.name == 'nt':
import matplotlib
datafiles = matplotlib.get_py2exe_datafiles()
if isinstance(datafiles, list):
files.extend(datafiles)
else:
files.append(datafiles)
os.chdir('bin')
for (dp, dn, names) in os.walk('share\\locale'):
files.append((dp, map(lambda x: opj('bin', dp, x), names)))
os.chdir('..')
files.append((".",["bin\\openerp.glade", 'bin\\dia_survey.glade', "bin\\win_error.glade", 'bin\\tipoftheday.txt', 'doc\\README.txt']))
files.append(("pixmaps", glob.glob("bin\\pixmaps\\*.*")))
files.append(("po", glob.glob("bin\\po\\*.*")))
files.append(("icons", glob.glob("bin\\icons\\*.png")))
files.append(("share\\locale", glob.glob("bin\\share\\locale\\*.*")))
mfcdir = 'C:\Python27\Lib\site-packages\pythonwin'
mfcfiles = [os.path.join(mfcdir, i)
for i in ["mfc90.dll", "mfc90u.dll", "mfcm90.dll",
"mfcm90u.dll", "Microsoft.VC90.MFC.manifest"]]
files += [("Microsoft.VC90.MFC", mfcfiles)]
else:
files.append((opj('share','man','man1',''),['man/openerp-client.1']))
files.append((opj('share','doc', 'openerp-client-%s' % version), [f for
f in glob.glob('doc/*') if os.path.isfile(f)]))
files.append((opj('share', 'pixmaps', 'openerp-client'),
glob.glob('bin/pixmaps/*.png')))
files.append((opj('share', 'pixmaps', 'openerp-client', 'icons'),
glob.glob('bin/icons/*.png')))
files.append((opj('share', 'openerp-client'), ['bin/openerp.glade', 'bin/tipoftheday.txt',
'bin/win_error.glade', 'bin/dia_survey.glade']))
return files
开发者ID:gisce,项目名称:erpclient,代码行数:35,代码来源:setup.py
示例3: run
def run(self):
#
# py2exe runs install_data a second time. We want to inject some
# data files into the dist but we do it here so that if the user
# does a straight "install", they won't end up dumped into their
# Python directory.
#
# py2exe doesn't have its own data_files or resources options.
#
if self.distribution.data_files is None:
self.distribution.data_files = []
self.distribution.data_files.append(
("artwork", glob.glob("artwork/*")))
#
# javabridge's jars
#
import javabridge
self.distribution.data_files.append(
("javabridge/jars", javabridge.JARS))
#
# prokaryote's jar
#
import prokaryote
prokaryote_glob = os.path.dirname(prokaryote.__file__) + "/*.jar"
self.distribution.data_files.append(
("prokaryote", glob.glob(prokaryote_glob)))
#
# py2exe recipe for matplotlib
#
self.distribution.data_files += matplotlib.get_py2exe_datafiles()
#
# Support for zmq-14.0.0+
#
zmq_version = tuple([int(_) for _ in zmq.__version__.split(".")])
if zmq_version >= (14, 0, 0):
# Backends are new in 14.x
self.includes += [
"zmq.backend", "zmq.backend.cython", "zmq.backend.cython.*",
"zmq.backend.cffi", "zmq.backend.cffi.*"]
#
# Must include libzmq.pyd without renaming because it's
# linked against. The problem is that py2exe renames it
# to "zmq.libzmq.pyd" and then the linking fails. So we
# include it as a data file and exclude it as a dll.
#
if zmq_version >= (14, 0, 0):
self.distribution.data_files.append(
(".", [zmq.libzmq.__file__]))
self.dll_excludes.append("libzmq.pyd")
if self.msvcrt_redist is not None:
sources = [
os.path.join(self.msvcrt_redist, filename)
for filename in os.listdir(self.msvcrt_redist)]
self.distribution.data_files.append(
("./Microsoft.VC90.CRT", sources))
py2exe.build_exe.py2exe.run(self)
开发者ID:zindy,项目名称:CellProfiler,代码行数:58,代码来源:setup.py
示例4: get_data_files
def get_data_files(source_dir):
"""Pack data files into list of (target-dir, list-of-files)-tuples"""
dfiles = []
dfiles.extend(matplotlib.get_py2exe_datafiles())
# qt help files
dfiles.append(('doc',
glob.glob(join("cat", "gui", "helpbrowser", "*.qhc"))))
dfiles.append(('doc',
glob.glob(join("cat", "gui", "helpbrowser", "*.qch"))))
return dfiles
开发者ID:manerotoni,项目名称:afw,代码行数:14,代码来源:datafiles.py
示例5: build_datafiles
def build_datafiles(countries):
"""
Returns data_files
"""
tuples_list = []
data_files = matplotlib.get_py2exe_datafiles()
for country in countries:
model = find_data_files("./countries//%s/model" % country, "/countries/%s/model" % country, ["*.py"])
tuples_list.append(model[0])
castypes = find_data_files(
"./countries//%s/castypes/" % country, "/countries/%s/castypes/" % country, ["*.ofct"]
)
tuples_list.append(castypes[0])
param = find_data_files("./countries//%s/param/" % country, "/countries/%s/param/" % country, ["param.xml"])
tuples_list.append(param[0])
reformes = find_data_files(
"./countries//%s/reformes/" % country, "/countries/%s/reformes/" % country, ["*.ofp"]
)
tuples_list.append(reformes[0])
decomp = find_data_files(
"./countries//%s/decompositions/" % country, "/countries/%s/decompositions/" % country, ["decomp.xml"]
)
tuples_list.append(decomp[0])
if country == "france":
calibrations = find_data_files(
"./countries/france/calibrations/", "./countries/france/calibrations/", ["*.csv"]
)
tuples_list.append(calibrations[0])
data = find_data_files(
"./countries/france/data/",
"./countries/france/data/",
["*.csv", "amounts.h5", "actualisation_groups.h5"],
)
tuples_list.append(data[0])
data_sources = find_data_files(
"./countries/france/data/sources/", "./countries/france/data/sources/", ["*.xls"]
)
tuples_list.append(data_sources[0])
for tupl in tuples_list:
data_files.append(tupl)
return data_files
开发者ID:Jiss83,项目名称:openfisca-qt,代码行数:50,代码来源:setup.py
示例6: is_installed
def is_installed(self, environ, version):
options.set_debug(self.debug)
try:
import matplotlib
ver = matplotlib.__version__
if compare_versions(ver, version) == -1:
return self.found
self.found = True
except Exception:
if self.debug:
print(sys.exc_info()[1])
return self.found
self.environment["MATPLOTLIB_DATA_FILES"] = matplotlib.get_py2exe_datafiles()
return self.found
开发者ID:pombredanne,项目名称:pysysdevel,代码行数:16,代码来源:matplotlib_py.py
示例7: get_data_files
def get_data_files(target_dir=TARGET_DIR, mpl_data=True):
"""Pack data files into list of (target-dir, list-of-files)-tuples"""
dfiles = []
if mpl_data:
dfiles.extend(matplotlib.get_py2exe_datafiles())
dfiles.append((target_dir, _rsc))
dfiles.append((join(target_dir, 'rsrc', 'hmm'), _rfiles))
dfiles.append((_paltarget, glob.glob(join(abspath(_palettes), '*.zip'))))
for root, subdirs, files in os.walk(_battery_package):
for file_ in files:
if file_ not in (".git", ):
target = root.replace(RESOURCE_DIR, TARGET_DIR)
dfiles.append((target, [join(abspath(root), file_)]))
return dfiles
开发者ID:imcf,项目名称:cecog,代码行数:17,代码来源:datafiles.py
示例8: get_data_files
def get_data_files(target_dir=TARGET_BUNDLE,
mpl_data=True, qt_plugins=True):
"""Pack data files into list of (target-dir, list-of-files)-tuples"""
dfiles = []
if mpl_data:
dfiles.extend(matplotlib.get_py2exe_datafiles())
paltarget = join(target_dir, 'palettes', 'zeiss')
dfiles.append((target_dir, _rsc))
dfiles.append((paltarget, glob.glob(join(abspath(_palettes), '*.zip'))))
# schema files
dfiles.append((join(target_dir, 'schemas'),
glob.glob(join(RESOURCE_DIR, 'schemas', "*.xsd"))))
dfiles.append((join(target_dir, 'ontologies'),
glob.glob(join(RESOURCE_DIR, 'ontologies', "*.owl"))))
for root, subdirs, files in os.walk(_battery_package):
for file_ in files:
if file_ not in (".git", ):
target = root.replace(RESOURCE_DIR, target_dir)
dfiles.append((target, [join(abspath(root), file_)]))
if qt_plugins:
for dir_ in ['sqldrivers', 'platforms']:
# Pyqt5 does not start without platform plugins.
# sorry for not finding a better hack
qt5plugins = glob.glob(
join(dirname(PyQt5.__file__), "plugins", dir_, "*.*"))
qt5plugins = (dir_, qt5plugins)
dfiles.append(qt5plugins)
if sys.platform.startswith("win"):
for f in ("libEGL.dll", ):
dfiles.append(('.', [join(dirname(PyQt5.__file__), f)]))
# # qt help files
dfiles.append((join(target_dir, 'doc'),
glob.glob(join(RESOURCE_DIR, 'doc', "*.qhc"))))
dfiles.append((join(target_dir, 'doc'),
glob.glob(join(RESOURCE_DIR, 'doc', "*.qch"))))
return dfiles
开发者ID:CellCognition,项目名称:cecog,代码行数:43,代码来源:datafiles.py
示例9: get_data_files
def get_data_files(target_dir=TARGET_BUNDLE, mpl_data=True):
"""Pack data files into list of (target-dir, list-of-files)-tuples"""
dfiles = []
if mpl_data:
dfiles.extend(matplotlib.get_py2exe_datafiles())
paltarget = join(target_dir, 'palettes', 'zeiss')
dfiles.append((target_dir, _rsc))
dfiles.append((paltarget, glob.glob(join(abspath(_palettes), '*.zip'))))
# schema files
dfiles.append((join(target_dir, 'schemas'),
glob.glob(join(RESOURCE_DIR, 'schemas', "*.xsd"))))
for root, subdirs, files in os.walk(_battery_package):
for file_ in files:
if file_ not in (".git", ):
target = root.replace(RESOURCE_DIR, target_dir)
dfiles.append((target, [join(abspath(root), file_)]))
return dfiles
开发者ID:bobi5rova,项目名称:cecog,代码行数:21,代码来源:datafiles.py
示例10: is_installed
def is_installed(self, environ, version=None, strict=False):
options.set_debug(self.debug)
try:
import matplotlib
ver = matplotlib.__version__
not_ok = (compare_versions(ver, version) == -1)
if strict:
not_ok = (compare_versions(ver, version) != 0)
if not_ok:
if self.debug:
print('Wrong version of ' + self.pkg + ': ' +
str(ver) + ' vs ' + str(version))
return self.found
self.found = True
except ImportError:
if self.debug:
print(sys.exc_info()[1])
return self.found
self.environment['MATPLOTLIB_DATA_FILES'] = \
matplotlib.get_py2exe_datafiles()
return self.found
开发者ID:sean-m-brennan,项目名称:pysysdevel,代码行数:22,代码来源:matplotlib_py.py
示例11: get_hotspotter_datafiles
def get_hotspotter_datafiles():
'Build the data files used by py2exe and py2app'
import matplotlib
data_files = []
# Include Matplotlib data (for figure images and things)
data_files.extend(matplotlib.get_py2exe_datafiles())
# Include TPL Libs
plat_tpllibdir = join('hotspotter', '_tpl', 'lib', sys.platform)
if sys.platform == 'win32':
# Hack to get MinGW dlls in for FLANN
data_files.append(('',[join(plat_tpllibdir, 'libgcc_s_dw2-1.dll'),
join(plat_tpllibdir,'libstdc++-6.dll')]))
if sys.platform == 'darwin':
pass
else:
for root,dlist,flist in os.walk(plat_tpllibdir):
tpl_dest = root
tpl_srcs = [realpath(join(root,fname)) for fname in flist]
data_files.append((tpl_dest, tpl_srcs))
# Include Splash Screen
splash_dest = normpath('_frontend')
splash_srcs = [realpath('_frontend/splash.png')]
data_files.append((splash_dest, splash_srcs))
return data_files
开发者ID:Erotemic,项目名称:hotspotter,代码行数:24,代码来源:setup.old.py
示例12: setup
setup (
cmdclass = {"py2exe": my_py2exe},
name="py-acqua",
version="1.0",
description="PyAcqua program",
author="Francesco Piccinno",
author_email="[email protected]",
url="http://www.pyacqua.net",
windows = [
{"script": "src/acqua.py",
"icon_resources": [(1, "pixmaps/pyacqua.ico")]
}
],
#console=[
# {"script": "src/acqua.py",
# "icon_resources": [(1, "pixmaps/pyacqua.ico")]
# }
#],
packages=[''],
package_dir={'': 'src'},
options=opts,
data_files=moon_walk ("skins", "skins") + moon_walk ("locale", "locale") + [
#("src", glob.glob ("src/*")),
#Disabilitiamo i plugins
#("plugins", glob.glob ("plugins/*.py")),
("pixmaps", glob.glob ("pixmaps/*")),
("tips", glob.glob ("tips/*.txt"))
] + [matplotlib.get_py2exe_datafiles()]
)
开发者ID:kucukkose,项目名称:py-acqua,代码行数:29,代码来源:win-setup.py
示例13: glob
shutil.rmtree("build", ignore_errors=True)
shutil.rmtree("dist", ignore_errors=True)
from glob import glob
# Inculsion des fichiers de donn�es
#################################################################################################
# Fichiers MSVC
data_files = [("Microsoft.VC90.CRT", glob(r'msvcr90.dll')),
("Microsoft.VC90.CRT", glob(r'Microsoft.VC90.CRT.manifest'))]
# Traductions
#data_files.extend([(os.path.join("locale", "en", "LC_MESSAGES"), glob(r'pysylic.mo'))])
# Fichiers Matplotlib
data_files.extend(matplotlib.get_py2exe_datafiles())
options = { "py2exe" : { "compressed": 2,
"optimize": 2,
"bundle_files": 3,
'packages' : ['pytz', 'win32api'],
'excludes' : ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'pywin.debugger',
'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
'Tkconstants', 'Tkinter', 'pydoc', 'doctest', 'test', 'sqlite3',
"PyQt4", "PyQt4.QtGui","PyQt4._qt",
"matplotlib.backends.backend_qt4agg", "matplotlib.backends.backend_qt4", "matplotlib.backends.backend_tkagg",
"matplotlib.numerix",
开发者ID:cedrick-f,项目名称:ioino,代码行数:31,代码来源:build.py
示例14: join
dpath = join(p, "doc", "build", "html")
files = []
folders = {}
for name in os.listdir(dpath):
if isfile(join(dpath, name)):
files.append(join(dpath, name))
else:
folders[name] = []
for f in os.listdir(join(dpath, name)):
folders[name].append(join(dpath, name, f))
# set the data files
datafiles = list(mpl.get_py2exe_datafiles()) + [("data", [join(p, "data", "map_lilou.csv")]),
("documentation", files)] + [(join("documentation", key), value) for key, value in folders.iteritems()]
setup(
name="swan",
version=version,
description=description_short,
author=author,
data_files = datafiles,
windows = [{"script":join(p, "src", "swan.py")}],
options = {"py2exe":{
"includes":["sip",
"scipy.special._ufuncs_cxx",
"scipy.sparse.csgraph._validation",
开发者ID:INM-6,项目名称:swan,代码行数:31,代码来源:setup.py
示例15:
f1 = 'examples/' + f
if os.path.isfile(f1): # skip directories
f2 = 'examples', [f1]
example_files.append(f2)
data_files = []
for f in os.listdir("./stamp/data"):
f1 = "./stamp/data/" + f
if os.path.isfile(f1): # skip directories
f2 = "library/stamp/data", [f1]
data_files.append(f2)
root_files = ['LICENSE.txt', './windows/STAMP.exe.log', './windows/readme.txt', 'msvcp90.dll', './manual/STAMP_Users_Guide.pdf']
mpl_data_files = mpl.get_py2exe_datafiles()
# setup configuration
setup(
name = "STAMP",
version = "2.1.1",
description = "Statistical analysis of taxonomic and functional profiles",
author = "Donovan Parks",
windows=[{"script":"STAMP.py", "icon_resources": [(1, "./stamp/icons/stamp.ico")]}],
options =
{
"py2exe":
{
"unbuffered": True,
"optimize": 2,
"skip_archive": True,
开发者ID:IUEayhu,项目名称:STAMP,代码行数:31,代码来源:createExeWindows.py
示例16: setup
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
################
#!/usr/bin/python
##################
# setup.py
#
# Copyright David Baddeley, 2009
# [email protected]
#
# This file may NOT be distributed without express permision from David Baddeley
#
##################
from distutils.core import setup
try:
import py2exe
import matplotlib
setup(console=['taskWorkerME.py'], data_files=matplotlib.get_py2exe_datafiles())
except:
pass
开发者ID:RuralCat,项目名称:CLipPYME,代码行数:30,代码来源:setup_exe.py
示例17:
"_gtkagg",
"_tkagg",
"nose",
"wx.tools",
"pylab",
"scipy.weave",
"Tkconstants",
"Tkinter",
"tcl",
"Cython",
"imagej",
"h5py",
"vigra",
"PyQt4",
"zmq",
],
"dll_excludes": [
"libgdk-win32-2.0-0.dll",
"libgobject-2.0-0.dll",
"libgdk_pixbuf-2.0-0.dll",
"tcl84.dll",
"tk84.dll",
"jvm.dll",
"MSVCP90.dll",
],
}
},
data_files=(matplotlib.get_py2exe_datafiles() + [("icons", glob.glob("icons\\*.png"))]),
cmdclass={"msi": CellProfilerAnalystMSI},
)
开发者ID:CellProfiler,项目名称:CellProfiler-Analyst,代码行数:30,代码来源:setup_py2exe.py
示例18: open
# Fichiers à importer :
('', ['noethys/Versions.txt', 'noethys/Licence.txt', 'noethys/Icone.ico']),
]
# Autres data_files
if "py2exe" in sys.argv :
# Ajoute les fichiers de Matplotlib
import matplotlib as mp
matplotlib_font_afm = glob.glob(os.sep.join([mp.get_data_path(), 'fonts\\afm\\*']))
matplotlib_font_pdfcorefonts = glob.glob(os.sep.join([mp.get_data_path(), 'fonts\\pdfcorefonts\\*']))
matplotlib_font_ttf = glob.glob(os.sep.join([mp.get_data_path(), 'fonts\\ttf\\*']))
matplotlib_images = glob.glob(os.sep.join([mp.get_data_path(), 'images\\*']))
data_files += mp.get_py2exe_datafiles()
# Ajoute les fichiers Windows
data_files.append(('', ['noethys/msvcm90.dll', 'noethys/msvcp90.dll', 'noethys/msvcr90.dll', 'noethys/Microsoft.VC90.CRT.manifest', 'noethys/gdiplus.dll', ]))
setup(
name = "Noethys",
version = VERSION_APPLICATION,
author = "Ivan LUCAS",
description = u"Noethys, le logiciel libre et gratuit de gestion multi-activités",
long_description = open("README.md").read().decode("iso-8859-15"),
url = "http://www.noethys.com",
license = "GPL V3",
plateformes = "ALL",
classifiers = [ "Topic :: Office/Business",
开发者ID:Noethys,项目名称:Noethys,代码行数:31,代码来源:setup.py
示例19: setup
import sys
from distutils.core import setup
import py2exe
from distutils.core import setup
import py2exe
import matplotlib
MyData_Files = ["config.cfg", "TABOB.TXT"]
setup(
windows=[{"script": "at.py", "icon_resources": [(1, "star.ico")]}],
options={"py2exe": {"includes": ["matplotlib.backends.backend_tkagg"], "excludes": ["_gtkagg"]}},
data_files=MyData_Files + matplotlib.get_py2exe_datafiles(),
)
开发者ID:photometr,项目名称:alttime,代码行数:15,代码来源:setup.py
示例20:
#setup script for py2exe
#run at command line: python setup.py py2exe
from distutils.core import setup
import py2exe
import matplotlib
import os
filesList = matplotlib.get_py2exe_datafiles()
filesList.append(('', ['EJico.ico']))
filesList.append(('', ['tutorial.pdf']))
filesList.append(('', ['cFunctions.so']))
filesList.append(('', ['license.txt']))
filesList.append(('', ['EJico.ico']))
filesList.append(('src', ['cFunctions.c']))
filesList.append(('src', ['complex.h']))
filesList.append(('src', ['erwinjr.pyw']))
filesList.append(('src', ['MaterialConstants.py']))
filesList.append(('src', ['settings.py']))
filesList.append(('src', ['readme.txt']))
filesList.append(('src', ['create_exe.py']))
filesList.append(('src', ['SupportClasses.py']))
filesList.append(('src', ['ThePhysics.py']))
filesList.append(('src', ['setup_script.iss']))
dirPaths = ['images', 'examples']
for dirPath in dirPaths:
for files in os.listdir(dirPath):
f1 = dirPath + '/' + files
if os.path.isfile(f1): # skip directories
f2 = dirPath, [f1]
filesList.append(f2)
开发者ID:akahs,项目名称:erwinjr,代码行数:31,代码来源:create_exe.py
注:本文中的matplotlib.get_py2exe_datafiles函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论