コード例 #1
0
ファイル: setup.py プロジェクト: hhru/lucid-python-cerberus
 def sources_to_convert(self):
     file_names = []
     sources = findall(dir='pycerberus')
     tests = findall(dir='tests')
     for file_name in sources + tests:
         if not file_name.endswith('.py'):
             continue
         file_names.append(file_name)
     return file_names
コード例 #2
0
ファイル: __init__.py プロジェクト: rprospero/sasview
def data_files():
    """
    Return the data files associated with media.

    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    # Note: windows installer requires the plugin_models directory
    plugin_models = os.path.join(os.path.dirname(__file__), "plugin_models")
    data_files.append(('plugin_models', findall(plugin_models)))
    data_files.append(('media/fitting_media', findall(get_data_path("media"))))

    return data_files
コード例 #3
0
ファイル: Dist.py プロジェクト: H1d3r/binary_blobs
 def get_allfiles(self):
     if self._allfiles is None:
         # If a "main" distribution exists, use its files to prevent
         # unnecessary additional searches.
         if self.main_distribution:
             self._allfiles = self.main_distribution.get_allfiles()
         else:
             source_list = filelist.FileList()
             source_list.extend(filelist.findall())
             # Remove files that don't really belong in the file list.
             # Note the leading slash (\) before os.sep substitutions. It is
             # needed to prevent regex-escaping when os.sep is '\' (Windows).
             exclude_patterns = (
                 # revision control (CVS client) files
                 r'\%s?CVS(\.sandboxinfo)?\%s' % (os.sep, os.sep),
                 r'\.cvsignore$',
                 r'\.#[^\%s]+$' % os.sep,
                 # (X)Emacs temporary files
                 r'\.?#[^\%s]+#$' % os.sep,
                 # common editor backup files
                 r'[^\%s]+~$' % os.sep,
                 # python bytecode files
                 r'\.py[co]$',
                 )
             for pattern in exclude_patterns:
                 source_list.exclude_pattern(pattern, is_regex=True)
             self._allfiles = source_list.files
     return self._allfiles
コード例 #4
0
ファイル: __init__.py プロジェクト: diffpy/srfit-sasview
def data_files():
    """
    Return the data files associated with guiframe images .
    
    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    path = get_data_path(media="images")
    for f in findall(path):
        data_files.append(('images/icons', [f]))
    path = get_media_path(media="media")
    for f in findall(path):
        data_files.append(('media/guiframe_media', [f]))

    return data_files
コード例 #5
0
ファイル: tests.py プロジェクト: mauler/django-ssiexport
 def test_export_url(self):
     dburl = export_url("/")
     self.assertQuerysetEqual(
         dburl.templates.all(),
         ['<Template: index.html>'],
     )
     self.assertEqual(
         findall("export"),
         ['export/www/index.shtml', 'export/www/article/1/index.shtml'])
コード例 #6
0
ファイル: __init__.py プロジェクト: lewisodriscoll/sasview
def data_files():
    """
    Return the data files associated with media.
    
    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    path = os.path.dirname(__file__)
    p_path = os.path.join(path, 'plugin_models')
    for f in findall(p_path):
        data_files.append(('plugin_models', [f]))
    # path = get_data_path(media="media")
    for f in findall(path):
        data_files.append(('media/fitting_media', [f]))
    
    return data_files
コード例 #7
0
ファイル: test_filelist.py プロジェクト: 1st1/cpython
 def test_non_local_discovery(self):
     """
     When findall is called with another path, the full
     path name should be returned.
     """
     with test.support.temp_dir() as temp_dir:
         file1 = os.path.join(temp_dir, 'file1.txt')
         test.support.create_empty_file(file1)
         expected = [file1]
         self.assertEqual(filelist.findall(temp_dir), expected)
コード例 #8
0
ファイル: __init__.py プロジェクト: diffpy/srfit-sasview
def data_files():
    """
    Return the data files associated with media.
    
    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    path = get_data_path(media="media")
    path_img = get_data_path(media=os.path.join("media","img"))
    im_list = findall(path_img)
    for f in findall(path):
        if os.path.isfile(f) and f not in im_list:
            data_files.append(('media/models_media', [f]))
    
    for f in im_list:
        data_files.append(('media/models_media/img', [f]))
    return data_files
コード例 #9
0
ファイル: __init__.py プロジェクト: rprospero/sasview
def data_files():
    """
    Return the data files associated with media invariant.

    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    data_files.append(('media/invariant_media', findall(get_data_path("media"))))
    return data_files
コード例 #10
0
ファイル: __init__.py プロジェクト: hjjvandam/srfit-sasview
def data_files():
    """
    Return the data files associated with media calculator.
    
    The format is a list of (directory, [files...]) pairs which can be
    used directly in setup(...,data_files=...) for setup.py.

    """
    data_files = []
    path = get_data_path(media="media")
    for f in findall(path):
        data_files.append(('media/calculator_media', [f]))
    return data_files
コード例 #11
0
ファイル: test_filelist.py プロジェクト: 1st1/cpython
 def test_basic_discovery(self):
     """
     When findall is called with no parameters or with
     '.' as the parameter, the dot should be omitted from
     the results.
     """
     with test.support.temp_cwd():
         os.mkdir('foo')
         file1 = os.path.join('foo', 'file1.txt')
         test.support.create_empty_file(file1)
         os.mkdir('bar')
         file2 = os.path.join('bar', 'file2.txt')
         test.support.create_empty_file(file2)
         expected = [file2, file1]
         self.assertEqual(sorted(filelist.findall()), expected)
コード例 #12
0
ファイル: fbFigBrowser.py プロジェクト: BreakawayLabs/MOM4p1
    def BuildFileTree(self, dirs):
        self.tree = MyTree("", showRoot=False)
        files = []
        for i in range(len(dirs)):
            dir = dirs[i]
            self.tree.AddNode([dir,], dir, False)
            files.append(list(filelist.findall(dir)))

            relFiles = []
            for j in range(len(files[i])):
                f = (files[i])[j]
                relFiles.append(list(f[len(dir):].strip("/").split("/")))
                self.tree.AddNode(relFiles[j], (files[i])[j], True)

        self.tree.RemoveBadFiles(self.tree.rootNode)
コード例 #13
0
ファイル: tests.py プロジェクト: mauler/django-ssiexport
 def test_get_watch_instances(self):
     from ssiexport import world
     world.watch.append(self.article)
     world.watch.append(Author.objects.all())
     instances = get_watch_instances()
     self.assertEqual(
         [i.content_object for i in instances],
         [
             self.article,
             self.paulo,
             self.roberto,
         ]
     )
     self.assertEqual(
         findall("export"),
         [
             'export/www/index.shtml',
             'export/www/article/1/index.shtml',
         ])
コード例 #14
0
    def run(self):
        if not os.path.exists(self.install_dir):
            self.outfiles.extend(self.mkpath(self.install_dir))

        build = self.get_finalized_command('build')
        build_configure = build.build_configure
        for item in self.modules:
            if os.path.isfile(item):
                if item in self.configurable:
                    item = os.path.join(build_configure, item)
                target, copied = self.copy_file(item, self.install_dir)
                self.outfiles.append(target)
            elif os.path.isdir(item):
                # FIXME: respect "configureable" files
                files.extend(filelist.findall(item))
            else:
                self.warn('Unable to find %s...' % item)
                
        self.byte_compile(self.outfiles)
        self.outfiles.extend(self._bytecode_filenames(self.outfiles))
コード例 #15
0
ファイル: i18n.py プロジェクト: hsavolai/vmlab
def _extract_rml_files(root):
    files = []
    for rml_file in sorted(findall(root)):
        if not rml_file.endswith('.rml'):
            continue
        data = open(rml_file).read()
        data = _clean_rml(data)
        if not len(data):
            continue
        extracted = rml_file + '.extracted'
        if os.path.exists(extracted):
            os.unlink(extracted)
        open(extracted, 'w').write(data)
        extracted = extracted[len(root)+1:]
        cmd = 'intltool-extract -q --type=gettext/xml %s' % extracted
        res = os.system(cmd)
        if res != 0:
            raise SystemExit("ERROR: failed to generate pot file")
        os.unlink(extracted)
        files.append(extracted + '.h')
    return files
コード例 #16
0
 def test_missing_symlink(self):
     with os_helper.temp_cwd():
         os.symlink('foo', 'bar')
         self.assertEqual(filelist.findall(), [])
コード例 #17
0
ファイル: compile.py プロジェクト: eugeni/trafdump
from distutils.core import setup
from distutils.filelist import findall

import py2exe
import glob
import os

# {{{ gtkfiles
mplfiles = [ \
    ("mpl-data", [ "distfiles/mpl-data/lineprops.glade", "distfiles/mpl-data/matplotlib.conf", "distfiles/mpl-data/matplotlibrc" ]),
    ("mpl-data/images", findall("distfiles/mpl-data/images")),
    ]
gtkfiles = [ \
    ("etc", [  ]),
    ("etc/gtk-2.0", [ "distfiles/etc/gtk-2.0/gdk-pixbuf.loaders", "distfiles/etc/gtk-2.0/gtk.immodules", "distfiles/etc/gtk-2.0/gtkrc", "distfiles/etc/gtk-2.0/im-multipress.conf" ]),
    ("etc/pango", [ "distfiles/etc/pango/pango.aliases", "distfiles/etc/pango/pango.modules" ]),
    ("lib", [ "distfiles/lib/charset.alias" ]),
    ("lib/gtk-2.0", [  ]),
    ("lib/gtk-2.0/2.10.0", [  ]),
    ("lib/gtk-2.0/2.10.0/engines", [ "distfiles/lib/gtk-2.0/2.10.0/engines/libpixmap.dll", "distfiles/lib/gtk-2.0/2.10.0/engines/libsvg.dll", "distfiles/lib/gtk-2.0/2.10.0/engines/libwimp.dll" ]),
    ("lib/gtk-2.0/2.10.0/immodules", [ "distfiles/lib/gtk-2.0/2.10.0/immodules/im-am-et.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-cedilla.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-ime.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-inuktitut.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-ipa.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-multipress.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-thai.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-ti-er.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-ti-et.dll", "distfiles/lib/gtk-2.0/2.10.0/immodules/im-viqr.dll" ]),
    ("lib/gtk-2.0/2.10.0/loaders", [ "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll", "distfiles/lib/gtk-2.0/2.10.0/loaders/svg_loader.dll" ]),
    ("lib/libglade", [  ]),
    ("lib/libglade/2.0", [  ]),
    ("lib/pango", [  ]),
    ("lib/pango/1.6.0", [  ]),
    ("lib/pango/1.6.0/modules", [ "distfiles/lib/pango/1.6.0/modules/pango-arabic-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-arabic-lang.dll", "distfiles/lib/pango/1.6.0/modules/pango-basic-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-basic-win32.dll", "distfiles/lib/pango/1.6.0/modules/pango-hangul-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-hebrew-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-indic-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-indic-lang.dll", "distfiles/lib/pango/1.6.0/modules/pango-khmer-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-syriac-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-thai-fc.dll", "distfiles/lib/pango/1.6.0/modules/pango-tibetan-fc.dll" ]),
    ("share", [  ]),
    ("share/themes", [  ]),
    ("share/themes/MS-Windows", [  ]),
    ("share/themes/MS-Windows/gtk-2.0", [ "distfiles/share/themes/MS-Windows/gtk-2.0/gtkrc" ]),
コード例 #18
0
ファイル: setup2.py プロジェクト: niyasl2/auto_gui
#-------------------------------------------------------------------------------
#!/usr/bin/env python

# Setup Script - <a title="How to rotate an Ellipse?" href="http://mycola.info/2012/04/29/how-to-rotate-an-ellipse/" target="_blank">For ellipse rotation program</a>
# www.mycola.info
#Samitha Ransara - The University of Auckland
from distutils.core import setup
import py2exe
from distutils.filelist import findall
import os
import chilkat
import py2exe, sys
import glob

matplotlibdatadir = r"C:\Documents and Settings\Administrator\Desktop\auto_callbox"    #find the data directories
matplotlibdata = findall(matplotlibdatadir)            #find all files
matplotlibdata_files = []
for f in matplotlibdata:
    dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir)+1:])
    matplotlibdata_files.append((os.path.split(dirname)[0], [f]))
#include all dependency packages and exclude troublesome DLL s, you might need to exclude more or less DLL
#files based on your operating system.

setup(
    name = 'iTester',
    version='3.00',
    author='Niyas Sait',
    description = 'NVIDIA',
    console=[{'script':'gui2.py',
            'icon_resources':[(1,'icera.ico')]}],
    data_files=[('.', glob.glob('*.dll')),
コード例 #19
0
ファイル: setup.py プロジェクト: gszpura/zenodo
# -*- coding: utf-8 -*-

from setuptools import setup
from distutils.filelist import findall

setup(
    name='openaire-bibformat',
    version='0.1',
    packages=['invenio.bibformat_elements','invenio'],
    package_dir={'invenio': 'lib',},
    zip_safe=False,
    include_package_data=True,
    namespace_packages=['invenio','invenio.bibformat_elements'],
    data_files=[
        ('etc/bibformat/format_templates/', findall('format_templates/')),
        ('etc/bibformat/output_formats/', findall('output_formats/')),
    ],
)
コード例 #20
0
ファイル: test_filelist.py プロジェクト: 1st1/cpython
 def test_missing_symlink(self):
     with test.support.temp_cwd():
         os.symlink('foo', 'bar')
         self.assertEqual(filelist.findall(), [])
コード例 #21
0
 def test_missing_symlink(self):
     with sql_mode.support.temp_cwd():
         os.symlink('foo', 'bar')
         self.assertEqual(filelist.findall(), [])
コード例 #22
0
ファイル: _setup.py プロジェクト: XHermitOne/defis
        'pyreditor.bmp',\
        'readme.txt',\
        'rehelp.txt',\
        'bugs.txt',\
        'pyreditor.cfg',\
        'templates.cfg',\
        'history.txt',\
        'plugin-install.txt',\
        'todo.txt',\
        'license.txt'
        ]

# Extend data with all the files from the named subdirs
add_dirs = [r'images', r'demos']
for add_dir in add_dirs:
    add_data = findall(add_dir)
    files = []
    for f in add_data:
        dirname = os.path.join(add_dir, f[len(add_dir)+1:])
        files.append((os.path.split(dirname)[0], [f]))
    data.extend(files)
        
setup(
    version = ver,
    description = "PyReditor - Python Regular Expression Editor",
    author = author,
    author_email = author_email,
    url='http://www./',
    name = "pyreditor",
    options = options,
    zipfile='library.dat',
コード例 #23
0
ファイル: setup.py プロジェクト: prajeeshag/thalassa
cmdclass = {
    'build': build,
    'generate_qtui': generate_qtui,
}

kwargs = {}
data_files = []
if 'py2exe' in sys.argv:
    import py2exe
    import matplotlib
    import mpl_toolkits.basemap as basemap

    data_files = matplotlib.get_py2exe_datafiles()
    data_files.append(
        (join('mpl_toolkits', 'basemap',
              'data'), findall(join(dirname(basemap.__file__), 'data'))))
    kwargs['windows'] = [{'script': "bin/thalassa", 'data_files': data_files}],
    kwargs['options'] = {
        "py2exe": {
            "skip_archive":
            True,
            "includes":
            ["sip", "netCDF4_utils", "netcdftime", "mpl_toolkits.basemap"],
            "dll_excludes": ["MSVCP90.dll"]
        }
    },

classifiers = """\
Development Status :: 3 - Alpha
Environment :: X11 Applications :: Qt
Intended Audience :: Science/Research
コード例 #24
0
ファイル: setup.py プロジェクト: andreadanzi/NRS_FBG
from distutils.core import setup
import py2exe, sys
from distutils.filelist import findall
import os
import matplotlib

matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)
matplotlibdata_files = []
for f in matplotlibdata:
    dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir)+1:])
    matplotlibdata_files.append((os.path.split(dirname)[0], [f]))

sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")

includes = ["scipy.sparse.csgraph._validation", "scipy.spatial.kdtree", "scipy.sparse.csgraph._shortest_path"]

setup(name = 'NrsWXApp', version = '0.1',windows=['NrsWXApp.py'], py_modules=['NrsWXApp'],
    options={
        'py2exe': {
                    'packages' : ['matplotlib', 'pytz'],
                    'excludes': ['_gtkagg', '_tkagg'],
                    'includes':includes,
                    'dll_excludes': ['libgdk-win32-2.0-0.dll','libgdk_pixbuf-2.0-0.dll', 'libgobject-2.0-0.dll']
                   }
        },
    data_files=matplotlib.get_py2exe_datafiles()
)
コード例 #25
0
ファイル: setup_exe.py プロジェクト: pkienzle/sasview
    def __init__(self, **kw):
        self.__dict__.update(kw)
        # for the versioninfo resources
        self.version = local_config.__version__
        self.company_name = "SasView.org"
        self.copyright = "copyright 2009 - 2016"
        self.name = "SasView"

#
# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
# to use the MatPlotLib.
#
path = os.getcwd()

matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)

DATA_FILES = []

if tinycc:
    DATA_FILES += tinycc.data_files()

# Copying SLD data
import periodictable
DATA_FILES += periodictable.data_files()

from sas.sasgui.perspectives import fitting
DATA_FILES += fitting.data_files()

from sas.sasgui.perspectives import calculator
DATA_FILES += calculator.data_files()
コード例 #26
0
ファイル: setup.py プロジェクト: jianzhou722/schism_svn_tags
def adddir(path, localtarget=None):
    if localtarget == None: localtarget = path
    for f in findall(path):
        localname = os.path.join(localtarget, f[len(path) + 1:])
        if 'CVS' in localname: continue
        own_data_files.append((os.path.dirname(localname), [f]))
コード例 #27
0
ファイル: setup.py プロジェクト: luizirber/thalassa
cmdclass = {
    'build': build,
    'generate_qtui': generate_qtui,
}

kwargs = {}
data_files = []
if 'py2exe' in sys.argv:
    import py2exe
    import matplotlib
    import mpl_toolkits.basemap as basemap

    data_files = matplotlib.get_py2exe_datafiles()
    data_files.append((join('mpl_toolkits', 'basemap', 'data'),
                       findall(join(dirname(basemap.__file__), 'data')) ))
    kwargs['windows'] = [{'script': "bin/thalassa",
                          'data_files': data_files}],
    kwargs['options'] = {"py2exe": {"skip_archive":True,
                                    "includes": ["sip", "netCDF4_utils",
                                                 "netcdftime", "mpl_toolkits.basemap"],
                                    "dll_excludes": ["MSVCP90.dll"]}},

classifiers = """\
Development Status :: 3 - Alpha
Environment :: X11 Applications :: Qt
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Education
License :: OSI Approved :: GNU General Public License (GPL)
Operating System :: OS Independent
コード例 #28
0
#
# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
# to use the MatPlotLib.
#
path = os.getcwd()

media_dir = os.path.join(path, "media")
images_dir = os.path.join(path, "images")
test_dir = os.path.join(path, "test")
test_1d_dir = os.path.join(path, "test\\1d_data")
test_2d_dir = os.path.join(path, "test\\2d_data")
test_save_dir = os.path.join(path, "test\\save_states")
test_upcoming_dir = os.path.join(path, "test\\upcoming_formats")

matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)

site_loc = get_python_lib()
opencl_include_dir = os.path.join(site_loc, "pyopencl", "cl")

data_files = []

if tinycc:
    data_files += tinycc.data_files()

# Copying SLD data
import periodictable

data_files += periodictable.data_files()

import sas.sasgui.perspectives.fitting as fitting
コード例 #29
0
ファイル: setup.py プロジェクト: mmaggi/zenodo
# -*- coding: utf-8 -*-

from setuptools import setup
from distutils.filelist import findall, translate_pattern

css_pattern = translate_pattern("*.css", prefix="css")
png_pattern = translate_pattern("*.png", prefix="css")

setup(
    name='openaire-webstyle',
    version='0.1',
    packages=['invenio'],
    package_dir={'invenio': 'lib'},
    zip_safe=False,
    include_package_data=True,
    namespace_packages=['invenio'],
    data_files=[
        ('var/www/css/', filter(css_pattern.match, findall('css/'))),
        ('var/www/css/images/', filter(png_pattern.match, findall('css/'))),
        ('var/www/img/', findall('img/')),
        ('var/www/js/', findall('js/')),
        ('var/www/flash/', findall('flash/')),
    ],
)
コード例 #30
0
import os
import argparse
import distutils.filelist as fu

parser = argparse.ArgumentParser()

parser.add_argument('--pkg', help="top level python package dir")
args = parser.parse_args()
modules = []
found = fu.findall(args.pkg)
os.system("cat /dev/null >> README.md")

for x in found:
    if '__' not in x and '.pyc' not in x and '.py' in x:
        os.system("pydoc3 {} >> README.md".format(x))
コード例 #31
0
ファイル: setup.py プロジェクト: leeooox/SPChart
            if os.path.isdir(srcname):
                my_copytree(srcname, dst)
            else:
                shutil.copy2(srcname, dst)
        except:
#            error.traceback()
            raise
#copy other resource folders
dirs = ["icons","rc","Example"]
for d in dirs:
    my_copytree(d, 'dist')



matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)
matplotlibdata_files = []
for f in matplotlibdata:
    dirname = os.path.join('mpl-data', f[len(matplotlibdatadir)+1:])
    matplotlibdata_files.append((os.path.split(dirname)[0], [f]))


setup(
    version = "0.0",
    description = "SPchart",
    name = "SPchart",
    author = "Aaron Lee",
    author_email = "*****@*****.**",
    options = options,
    # The lib directory contains everything except the executables and the python dll.
    zipfile = zipfile,
コード例 #32
0
ファイル: setup_mac.py プロジェクト: zattala/sasview
# Copy the config files
sasview_path = os.path.join('..', 'src', 'sas', 'sasview')
data_files.append(('.', [os.path.join(sasview_path, 'custom_config.py')]))
data_files.append(('config', [os.path.join(sasview_path, 'custom_config.py')]))
data_files.append(('.', [os.path.join(sasview_path, 'local_config.py')]))

# Copy the logging config
sas_path = os.path.join('..', 'src', 'sas')
data_files.append(('.', [os.path.join(sas_path, 'logging.ini')]))

if os.path.isfile("BUILD_NUMBER"):
    data_files.append(('.', ["BUILD_NUMBER"]))

# Copying the images directory to the distribution directory.
data_files.append(("images", findall(local_config.icon_path)))

# Copying the HTML help docs
data_files.append(("media", findall(local_config.media_path)))

# Copying the sample data user data
test_dir = local_config.test_path
for dirpath, dirnames, filenames in os.walk(test_dir):
    target_dir = os.path.join("test", os.path.relpath(dirpath, test_dir))
    source_files = [os.path.join(dirpath, f) for f in filenames]
    data_files.append((target_dir, source_files))

# See if the documentation has been built, and if so include it.
if os.path.exists(doc_path):
    for dirpath, dirnames, filenames in os.walk(doc_path):
        target_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path))
コード例 #33
0
    def finalize_options(self):
        self.modules = ''

        self._finalize_option('rsb', self.rsb_inventory_dir)
        self._finalize_option('rsbag', self.rsbag_inventory_dir)
        self._finalize_option('rst', self.rst_inventory_dir)
        self._finalize_option('cca', self.cca_inventory_dir)
        self._finalize_option('liboncilla', self.liboncilla_inventory_dir)
        self._finalize_option('ccaoncilla', self.ccaoncilla_inventory_dir)
        os.environ['sphinx_external_modules'] = self.modules

    def run(self):
        os.system("sphinx-build -b html manual build/manual")


try:
    os.makedirs('build/manual')
except OSError, e:
    if e.errno != errno.EEXIST:
        raise

setup(name='oncilla-sim-project-wizard',
      version='0.3.0',
      packages=['oncilla_sim'],
      license='Lesser General Public License version 3',
      long_description=open('README.rst').read(),
      scripts=['oncilla-sim-wizard'],
      cmdclass={'build_manual': BuildManual},
      data_files=[('share/doc/oncilla-sim/manual', findall('build/manual/')),
                  ('share/oncilla-sim', ['wizard.cfg'])])
コード例 #34
0
ファイル: setup.py プロジェクト: gszpura/zenodo
# -*- coding: utf-8 -*-

from setuptools import setup
from distutils.filelist import findall, translate_pattern

css_pattern = translate_pattern("*.css", prefix="css")
png_pattern = translate_pattern("*.png", prefix="css")

setup(
    name='openaire-webstyle',
    version='0.1',
    packages=['invenio'],
    package_dir={'invenio': 'lib'},
    zip_safe=False,
    include_package_data=True,
    namespace_packages=['invenio'],
    data_files=[
        ('var/www/css/', filter( css_pattern.match, findall('css/'))),
        ('var/www/css/images/', filter( png_pattern.match, findall('css/'))),
        ('var/www/img/',findall('img/')),
        ('var/www/js/',findall('js/')),
        ('var/www/flash/',findall('flash/')),
    ],
)
コード例 #35
0
ファイル: setup_mac.py プロジェクト: pkienzle/sasview
if os.path.isfile(category_config):
    DATA_FILES.append(('.', [category_config]))

if os.path.isfile("BUILD_NUMBER"):
    DATA_FILES.append(('.', ["BUILD_NUMBER"]))

images_dir = local_config.icon_path
media_dir = local_config.media_path
test_dir = local_config.test_path
test_1d_dir = os.path.join(test_dir, "1d_data")
test_2d_dir = os.path.join(test_dir, "2d_data")
test_save_dir = os.path.join(test_dir, "save_states")
test_upcoming_dir = os.path.join(test_dir, "upcoming_formats")

# Copying the images directory to the distribution directory.
for f in findall(images_dir):
    DATA_FILES.append(("images", [f]))

# Copying the HTML help docs
for f in findall(media_dir):
    DATA_FILES.append(("media", [f]))

# Copying the sample data user data
for f in findall(test_1d_dir):
    DATA_FILES.append((os.path.join("test","1d_data"), [f]))

# Copying the sample data user data
for f in findall(test_2d_dir):
    DATA_FILES.append((os.path.join("test","2d_data"), [f]))

# Copying the sample data user data
コード例 #36
0
ファイル: setup_exe.py プロジェクト: mcbeaker/sasview
        self.copyright = "copyright 2009 - 2013"
        self.name = "SasView"


#
# Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
# to use the MatPlotLib.
#
path = os.getcwd()

media_dir = os.path.join(path, "media")
images_dir = os.path.join(path, "images")
test_dir = os.path.join(path, "test")

matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)
data_files = []
# Copying SLD data
import periodictable
import logging
data_files += periodictable.data_files()

import sas.perspectives.fitting as fitting
data_files += fitting.data_files()

import sas.perspectives.calculator as calculator
data_files += calculator.data_files()

import sas.perspectives.invariant as invariant
data_files += invariant.data_files()
コード例 #37
0
ファイル: setup.py プロジェクト: mmaggi/zenodo
# -*- coding: utf-8 -*-

from setuptools import setup
from distutils.filelist import findall

setup(
    name='openaire-bibformat',
    version='0.1',
    packages=['invenio.bibformat_elements', 'invenio'],
    package_dir={
        'invenio': 'lib',
    },
    zip_safe=False,
    include_package_data=True,
    namespace_packages=['invenio', 'invenio.bibformat_elements'],
    data_files=[
        ('etc/bibformat/format_templates/', findall('format_templates/')),
        ('etc/bibformat/output_formats/', findall('output_formats/')),
    ],
)
コード例 #38
0
ファイル: setup.py プロジェクト: BoldingBruggeman/gotm
def adddir(path,localtarget=None):
    if localtarget is None: localtarget = path
    for f in findall(path):
        localname = os.path.join(localtarget, f[len(path)+1:])
        if 'CVS' in localname: continue
        own_data_files.append((os.path.dirname(localname),[f]))
コード例 #39
0
ファイル: setup_exe.py プロジェクト: rprospero/sasview
# Copy the config files
sasview_path = os.path.join('..', 'src', 'sas', 'sasview')
data_files.append(('.', [os.path.join(sasview_path, 'custom_config.py')]))
data_files.append(('config', [os.path.join(sasview_path, 'custom_config.py')]))
data_files.append(('.', [os.path.join(sasview_path, 'local_config.py')]))

# Copy the logging config
sas_path = os.path.join('..', 'src', 'sas')
data_files.append(('.', [os.path.join(sas_path, 'logging.ini')]))

if os.path.isfile("BUILD_NUMBER"):
    data_files.append(('.', ["BUILD_NUMBER"]))

# Copying the images directory to the distribution directory.
data_files.append(("images", findall(local_config.icon_path)))

# Copying the HTML help docs
data_files.append(("media", findall(local_config.media_path)))

# Copying the sample data user data
test_dir = local_config.test_path
for dirpath, dirnames, filenames in os.walk(test_dir):
    target_dir = os.path.join("test", os.path.relpath(dirpath, test_dir))
    source_files = [os.path.join(dirpath, f) for f in filenames]
    data_files.append((target_dir, source_files))

# See if the documentation has been built, and if so include it.
if os.path.exists(doc_path):
    for dirpath, dirnames, filenames in os.walk(doc_path):
        target_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path))
コード例 #40
0
ファイル: setup2exe.py プロジェクト: weiwenhao048/ORTI3D_code
import os.path
import matplotlib

## run with python setup2exe.py py2exe and include mrsvc90.dll in ilibq
######################################################
#
#  creation de la liste de donnees de l'application
#
######################################################

# liste des fichiers de donnees necessaires a l'application
all_data_files = []

# recuperation des fichiers de donnees de matplotlib (beaucoup sont inutiles, on peut les virer a la main)
matplotlibdatadir = matplotlib.get_data_path()
matplotlibdata = findall(matplotlibdatadir)
for f in matplotlibdata:
    dirname = os.path.join('matplotlibdata', f[len(matplotlibdatadir) + 1:])
    all_data_files.append((os.path.split(dirname)[0], [f]))

# recuperation des fichiers de donnees de ipht3d
utilsdata = findall('../utils')
for f in utilsdata:
    dirname = os.path.join('../utils', f[len(matplotlibdatadir) + 1:])
    all_data_files.append((os.path.split(dirname)[0], [f]))
bindata = findall('../bin')
for f in bindata:
    dirname = os.path.join('../bin', f[len(matplotlibdatadir) + 1:])
    all_data_files.append((os.path.split(dirname)[0], [f]))
docdata = findall('../doc')
for f in bindata:
コード例 #41
0
ファイル: operations.py プロジェクト: ahcub/armory
def zip_dir(path, zip_file_path=None, zip_root=None):
    zip_file_path = zip_file_path or '{}.zip'.format(path)
    zip_root = zip_root or basename(path)
    with ZipFile(zip_file_path, 'w') as zip_file:
        for file in findall(path):
            zip_file.write(file, join(zip_root, relpath(file, path)))
コード例 #42
0
if os.path.isfile(category_config):
    DATA_FILES.append(('.', [category_config]))

if os.path.isfile("BUILD_NUMBER"):
    DATA_FILES.append(('.', ["BUILD_NUMBER"]))

images_dir = local_config.icon_path
media_dir = local_config.media_path
test_dir = local_config.test_path
test_1d_dir = os.path.join(test_dir, "1d_data")
test_2d_dir = os.path.join(test_dir, "2d_data")
test_save_dir = os.path.join(test_dir, "save_states")
test_upcoming_dir = os.path.join(test_dir, "upcoming_formats")

# Copying the images directory to the distribution directory.
for f in findall(images_dir):
    DATA_FILES.append(("images", [f]))

# Copying the HTML help docs
for f in findall(media_dir):
    DATA_FILES.append(("media", [f]))

# Copying the sample data user data
for f in findall(test_1d_dir):
    DATA_FILES.append((os.path.join("test", "1d_data"), [f]))

# Copying the sample data user data
for f in findall(test_2d_dir):
    DATA_FILES.append((os.path.join("test", "2d_data"), [f]))

# Copying the sample data user data
コード例 #43
0
ファイル: setup.py プロジェクト: ponyisi/pyhepmc
        # Pick your license as you wish
        "License :: OSI Approved :: BSD License",
        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    keywords="generator montecarlo simulation data hep physics particle",
    packages=find_packages("src"),
    package_dir={"": "src"},
    extras_require={"tests": ["pytest", "numpy", "graphviz", "particle"]},
    ext_modules=[
        Extension(
            "pyhepmc_ng._bindings",
            [x for x in findall("src") if x.endswith(".cpp")]
            + [x for x in findall("extern/HepMC3/src") if x.endswith(".cc")],
            include_dirs=["src", "extern/HepMC3/include", "extern/pybind11/include"],
            define_macros=[
                ("HEPMC3_HEPEVT_NMXHEP", 10000)
            ],  # increase this if necessary
            language="c++",
        )
    ],
    zip_safe=False,
)