예제 #1
0
def _getDataFiles(x):
    """
    Returns a fully populated data_files ready to be fed to setup()

    WARNING: when creating a bdist_egg we need to include files inside bin,
    doc, config & htdocs into the egg therefore we cannot fetch indico.conf
    values directly because they will not refer to the proper place. We
    include those files in the egg's root folder.
    """

    # setup expects a list like this (('foo/bar/baz', 'wiki.py'),
    #                                 ('a/b/c', 'd.jpg'))
    #
    # What we do below is transform a list like this:
    #                                (('foo', 'bar/baz/wiki.py'),
    #                                 ('a', 'b/c/d.jpg'))
    #
    # first into a dict and then into a pallatable form for setuptools.

    # This re will be used to filter out etc/*.conf files and therefore not overwritting them
    isAConfRe = re.compile('etc\/[^/]+\.conf$')

    dataFiles = _generateDataPaths((('bin',           findall('bin'), 4),
                                    ('doc', ['doc/UserGuide.pdf','doc/AdminUserGuide.pdf'], 4),
                                    ('etc', [xx for xx in findall('etc') if not isAConfRe.search(xx)], 4),
                                    #('MaKaC',              findall('indico/MaKaC'), 13),
                                    ('htdocs',        findall('indico/htdocs'), 14)))
    return dataFiles
예제 #2
0
파일: main.py 프로젝트: vavdoshka/decoupy
def main(a_pathname, b_pathname):
    modules_a = findall(a_pathname)
    modules_b = findall(b_pathname)
    sys_path = [
        os.path.dirname(find_common_base_path(a_pathname, b_pathname))
    ] + sys.path
    out = {}
    traverse_dependencies(modules_a, a_pathname, b_pathname, out, sys_path)
    traverse_dependencies(modules_b, a_pathname, b_pathname, out, sys_path)
    return out
예제 #3
0
파일: setup.py 프로젝트: Cykooz/pcelery
def find_package_data():
    ignore_ext = {'.py', '.pyc', '.pyo'}
    base_package = 'pcelery'
    package_data = {}
    root = os.path.join(HERE, base_package)
    for path in findall(root):
        if path.endswith('~'):
            continue
        ext = os.path.splitext(path)[1]
        if ext in ignore_ext:
            continue

        # Find package name
        package_path = os.path.dirname(path)
        while package_path != root:
            if os.path.isfile(os.path.join(package_path, '__init__.py')):
                break
            package_path = os.path.dirname(package_path)
        package_name = package_path[len(HERE) + 1:].replace(os.path.sep, '.')

        globs = package_data.setdefault(package_name, set())
        data_path = path[len(package_path) + 1:]
        data_glob = os.path.join(os.path.dirname(data_path), '*' + ext)
        globs.add(data_glob)
    for key, value in package_data.items():
        package_data[key] = list(value)
    return package_data
예제 #4
0
def find_package_data(include_paths=None):
    include_paths = set(include_paths or [])
    ignore_ext = {'.py', '.pyc', '.pyo'}
    base_package = 'restfw_admin'
    package_data = {}
    root = os.path.join(HERE, base_package)
    for path in findall(root):
        if path.endswith('~'):
            continue
        rel_path = path[len(HERE):]
        is_strict_path = False
        ext = os.path.splitext(path)[1]

        if rel_path in include_paths:
            is_strict_path = True
        else:
            if ext in ignore_ext:
                continue

        # Find package name
        package_path = os.path.dirname(path)
        while package_path != root:
            if os.path.isfile(os.path.join(package_path, '__init__.py')):
                break
            package_path = os.path.dirname(package_path)
        package_name = package_path[len(HERE) + 1:].replace(os.path.sep, '.')

        globs = package_data.setdefault(package_name, set())
        data_path = path[len(package_path) + 1:]
        data_glob = data_path if is_strict_path else os.path.join(
            os.path.dirname(data_path), '*' + ext)
        globs.add(data_glob)
    for key, value in package_data.items():
        package_data[key] = list(value)
    return package_data
예제 #5
0
def egg_info_writer(cmd, basename, filename):
    # type: (setuptools.command.egg_info.egg_info, str, str) -> None
    """Read rcli configuration and write it out to the egg info.

    Args:
        cmd: An egg info command instance to use for writing.
        basename: The basename of the file to write.
        filename: The full path of the file to write into the egg info.
    """
    setupcfg = next((f for f in setuptools.findall()
                     if os.path.basename(f) == 'setup.cfg'), None)
    if not setupcfg:
        return
    parser = six.moves.configparser.ConfigParser()  # type: ignore
    parser.read(setupcfg)
    if not parser.has_section('rcli') or not parser.items('rcli'):
        return
    config = dict(parser.items('rcli'))
    for k, v in six.iteritems(config):
        if v.lower() in ('y', 'yes', 'true'):
            config[k] = True
        elif v.lower() in ('n', 'no', 'false'):
            config[k] = False
        else:
            try:
                config[k] = json.loads(v)
            except ValueError:
                pass
    cmd.write_file(basename, filename, json.dumps(config))
예제 #6
0
def _get_commands(dist  # type: setuptools.dist.Distribution
                  ):
    # type: (...) -> typing.Dict[str, typing.Set[str]]
    """Find all commands belonging to the given distribution.

    Args:
        dist: The Distribution to search for docopt-compatible docstrings that
            can be used to generate command entry points.

    Returns:
        A dictionary containing a mapping of primary commands to sets of
        subcommands.
    """
    py_files = (f for f in setuptools.findall()
                if os.path.splitext(f)[1].lower() == '.py')
    pkg_files = (f for f in py_files if _get_package_name(f) in dist.packages)
    commands = {}  # type: typing.Dict[str, typing.Set[str]]
    for file_name in pkg_files:
        with open(file_name) as py_file:
            module = typing.cast(ast.Module, ast.parse(py_file.read()))
        module_name = _get_module_name(file_name)
        _append_commands(commands, module_name, _get_module_commands(module))
        _append_commands(commands, module_name, _get_class_commands(module))
        _append_commands(commands, module_name, _get_function_commands(module))
    return commands
예제 #7
0
파일: setup.py 프로젝트: ewiger/runstat
def subdir_findall(dir, subdir):
    """
    Find all files in a subdirectory and return paths relative to dir
    This is similar to (and uses) setuptools.findall
    However, the paths returned are in the form needed for package_data
    """
    strip_n = len(dir.split('/'))
    path = '/'.join((dir, subdir))
    return ['/'.join(s.split('/')[strip_n:]) for s in setuptools.findall(path)]
예제 #8
0
파일: setup.py 프로젝트: chopralab/paddy
def subdir_findall(dir, subdir):
    """
    Find all files in a subdirectory and return paths relative to dir
    This is similar to (and uses) setuptools.findall
    However, the paths returned are in the form needed for package_data
    """
    strip_n = len(dir.split('/'))
    path = '/'.join((dir, subdir))
    return ['/'.join(s.split('/')[strip_n:]) for s in setuptools.findall(path)]
예제 #9
0
def findsome(subdir, extensions):
    """Find files under subdir having specified extensions

    Leading directory (datalad) gets stripped
    """
    return [
        f.split(pathsep, 1)[1] for f in findall(opj('datalad', subdir))
        if splitext(f)[-1].lstrip('.') in extensions
    ]
예제 #10
0
파일: setup.py 프로젝트: datalad/datalad
def findsome(subdir, extensions):
    """Find files under subdir having specified extensions

    Leading directory (datalad) gets stripped
    """
    return [
        f.split(pathsep, 1)[1] for f in findall(opj('datalad', subdir))
        if splitext(f)[-1].lstrip('.') in extensions
    ]
예제 #11
0
    def build_extension(self, ext):
        extdir = os.path.abspath(
            os.path.dirname(self.get_ext_fullpath(ext.name)))
        cmake_args = [
            '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
            '-DPYTHON_EXECUTABLE=' + sys.executable
        ]

        cfg = 'Debug' if self.debug else 'Release'
        build_args = ['--config', cfg]

        if platform.system() == "Windows":
            cmake_args += [
                '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(
                    cfg.upper(), extdir)
            ]
            if sys.maxsize > 2**32:
                cmake_args += ['-A', 'x64']
            build_args += ['--', '/m']
        else:
            cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
            build_args += ['--', '-j', str(multiprocessing.cpu_count())]

        env = os.environ.copy()
        env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(
            env.get('CXXFLAGS', ''), self.distribution.get_version())

        if 'CC' in env:
            cmake_args += ['-DCMAKE_C_COMPILER=' + env['CC']]
        if 'CXX' in env:
            cmake_args += ['-DCMAKE_CXX_COMPILER=' + env['CXX']]

        if not os.path.exists(self.build_temp):
            os.makedirs(self.build_temp)

        cmake = env['CMAKE'] if 'CMAKE' in env else 'cmake'
        subprocess.check_call([cmake, ext.sourcedir] + cmake_args,
                              cwd=self.build_temp,
                              env=env)
        subprocess.check_call([cmake, '--build', '.'] + build_args,
                              cwd=self.build_temp)

        packagedir = os.path.join(ext.sourcedir, 'sources/package')
        self.distribution.packages = find_packages(packagedir)
        self.distribution.package_dir = {
            package: os.path.join(packagedir, package.replace('.', '/'))
            for package in self.distribution.packages
        }
        self.distribution.package_data = {
            package: [
                filename
                for filename in findall(self.distribution.package_dir[package])
                if os.path.splitext(filename)[1] == '.pyi'
            ]
            for package in self.distribution.packages
        }
예제 #12
0
파일: setup.py 프로젝트: ipxe/cx
 def libcx_dist(self):
     """Build libcx C library distribution"""
     libcx_prep()
     subprocess.check_call(['make', 'distdir=dist-libcx', 'distdir'],
                           cwd=cxdir)
     if cxdistdir.exists():
         cxdistdir.unlink()
     cxdistdir.symlink_to(cxdir / 'dist-libcx')
     cxdistfile = sorted(findall(cxdistdir))
     with open('MANIFEST.in', 'wt') as f:
         f.write('# Generated automatically by setup.py - do not edit\n')
         f.writelines('include %s\n' % x for x in cxdistfile)
예제 #13
0
    def _find_existing_files(self, paths, excludes):
        def _subfindall(files, excludes):
            subfiles = list()
            # file ends with 'py' extension
            matching_pattern = r"[.]{1,1}py$"
            # file does not contain 'OLD' word nor underscore.
            not_matching_pattern = r"(OLD|_[\w_ +\-]+[.]{1,1}py$)"
            for file in files:
                cond_excludes = not any(
                    [file.startswith(exclude) for exclude in excludes])
                cond_true = bool(re.search(matching_pattern, file))
                cond_false = bool(re.search(not_matching_pattern, file))
                if cond_excludes and cond_true and not cond_false:
                    subfiles.append(file)
                    pass
                pass
            return subfiles

        findings = list()
        modules = list()

        parsedfindings = list()
        parsedmodules = list()

        if isinstance(paths, str):
            paths = [paths]
            pass
        if isinstance(excludes, str):
            excludes = [excludes]
            pass

        for path in paths:
            files = setuptools.findall(path)
            files = _subfindall(files, excludes)
            submodules = [file.replace(path, '') for file in files]
            submodules = [
                submodule[1:] if submodule.startswith(os.sep) else submodule
                for submodule in submodules
            ]
            submodules = [
                self._filename2module(submodule) for submodule in submodules
            ]

            findings += files
            modules += submodules
            pass

        [
            print("MODULE NAME |{0}| ON |{1}| ".format(m, f))
            for m, f in zip(modules, findings)
        ]
        return findings, modules
예제 #14
0
def _find_data_files():
    """Traverses the schema directory to identify all XSDs.

  Returns:
    A list of (target_directory: [files_list]) tuples.
  """
    data_files = collections.defaultdict(list)
    for filepath in findall('schemas'):
        if not filepath.endswith('.xsd'):
            continue
        directory, unused_filename = os.path.split(filepath)
        data_files[os.path.join('dsrf', directory)].append(filepath)
    return [(k, v) for k, v in data_files.iteritems()]
예제 #15
0
파일: utils.py 프로젝트: cl-ei/madliar
def find_all_package(path):
    from setuptools import findall

    path_split_char = "\\" if os.name in ("nt", ) else "/"
    all_packages_file = []

    for f in findall(path):
        f_path, f_ex = os.path.splitext(f)
        if f_ex in (".py", ".pyc"):
            module_name = f_path.replace(path_split_char, ".")
            if module_name not in all_packages_file:
                all_packages_file.append(module_name)

    return all_packages_file
예제 #16
0
def _generateDataPaths(x):

    dataFilesDict = {}

    for (baseDstDir, srcDir) in x:
        for f in findall(srcDir):
            dst_dir = os.path.join(baseDstDir,
                                   os.path.relpath(os.path.dirname(f), srcDir))
            if dst_dir not in dataFilesDict:
                dataFilesDict[dst_dir] = []
            dataFilesDict[dst_dir].append(f)

    dataFiles = []
    for k, v in dataFilesDict.items():
        dataFiles.append((k, v))

    return dataFiles
예제 #17
0
파일: setup.py 프로젝트: wtakase/indico
def _generateDataPaths(x):

    dataFilesDict = {}

    for (baseDstDir, srcDir) in x:
        for f in findall(srcDir):
            dst_dir = os.path.join(baseDstDir,
                                   os.path.relpath(os.path.dirname(f), srcDir))
            if dst_dir not in dataFilesDict:
                dataFilesDict[dst_dir] = []
            dataFilesDict[dst_dir].append(f)

    dataFiles = []
    for k, v in dataFilesDict.items():
        dataFiles.append((k, v))

    return dataFiles
예제 #18
0
파일: setup.py 프로젝트: akivajp/lpu
def get_modules(dirpath, suffixes=['.pyx', '.py'], additional_sources=None, **options):
    modules = []
    for path in findall(dirpath):
        if isinstance(suffixes, str):
            suffixes = [suffixes]
        basename = os.path.basename(path)
        if basename == "__init__.py":
            continue
        if not any([path.endswith(suffix) for suffix in suffixes]):
            continue
        dirpath = os.path.dirname(path)
        module = os.path.splitext( os.path.basename(path) )[0]
        package = get_package(dirpath)
        if package:
            module = package + '.' + module
        sources = [path]
        if additional_sources:
            sources = sources + list(additional_sources)
        modules.append( Extension(module, sources, **options) )
    return modules
import os
from setuptools import setup, find_packages, findall


setup(
    name = "openstack_dashboard_fileupload",
    version = "1.0",
    url = "https://launchpad.net/django-openstack/",
    license = "Apache 2.0",
    description = "OpenStack Fileupload Plugin.",
    author = "Devin Carlen et al.",
    author_email = "*****@*****.**",
    py_modules = ["openstack_dashboard.plugins.projadmin.fileupload"],
    packages = ["openstack_dashboard.plugins.fileupload"],
    package_data = {"openstack_dashboard.plugins.fileupload":
                        ["../../../" + s for s in
                        findall("openstack_dashboard/templates") +
                        findall("openstack_dashboard/static")],
    },
    classifiers = [
        "Development Status :: 4 - Beta",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
    ]
)

예제 #20
0
def test_findall_curdir(example_source):
    with example_source.as_cwd():
        found = list(setuptools.findall())
    expected = ['readme.txt', os.path.join('foo', 'bar.py')]
    assert found == expected
예제 #21
0
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "django-openstack",
    version = "0.3",
    url = 'https://launchpad.net/django-openstack/',
    license = 'Apache 2.0',
    description = "A Django interface for OpenStack.",
    long_description = read('README'),
    author = 'Devin Carlen',
    author_email = '*****@*****.**',
    packages = find_packages('src'),
    package_dir = {'': 'src'},
    package_data = {'django_openstack':
                        [s[len('src/django_openstack/'):] for s in
                         findall('src/django_openstack/templates')]},
    install_requires = ['setuptools', 'boto==1.9b', 'mox>=0.5.0',
                        'nova-adminclient'],
    classifiers = [
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)

예제 #22
0
파일: setup.py 프로젝트: kszucs/stolos
        'A DAG-based job queueing system and executor for performing work'
        ' with complex dependency requirements between applications'),
    long_description="Check the project homepage for details",
    keywords=[
        'stolos', 'scheduler', 'dag', 'directed acyclic graph', 'graph',
        'data', 'dependency', 'queue', 'queueing system', 'pipeline',
        'applications', 'machine learning', 'executor'],

    author='Sailthru Data Science Team',
    author_email='*****@*****.**',
    url='https://github.com/sailthru/stolos',

    packages=find_packages(),
    scripts=['./bin/stolos-submit'],
    data_files=[
        ('conf', findall('conf')),
        ('stolos/examples', findall('stolos/examples'))
    ],

    install_requires=[
        'argparse>=1.1',
        'argparse_tools>=1.0.5',
        'colorlog>=2.2.0',
        'kazoo>=1.3.1',
        'networkx>=1.8.1',
        'simplejson>=3.4.1',
        'six>=1.10.0'
    ],

    extras_require={
        'pyspark': ['pyspark'],
예제 #23
0
파일: setup.py 프로젝트: brotchie/redsapp
def include_data_files(*paths):
    return [('share/' + path, findall(path)) for path in paths]
예제 #24
0
def find_scripts():
    return [
        s for s in setuptools.findall('scripts/')
        if os.path.splitext(s)[1] != '.pyc'
    ]
예제 #25
0
def get_locales():
    locale_dir = 'locale'
    locales = []

    for dirpath, dirnames, filenames in os.walk(locale_dir):
        for filename in filenames:
            locales.append(
                (os.path.join('/usr/share', dirpath),
                 [os.path.join(dirpath, filename)])
            )

    return locales


setup(name='Kano Greeter',
      version='1.0',
      description='A greeter for Kano OS',
      author='Team Kano',
      author_email='*****@*****.**',
      url='https://github.com/KanoComputing/kano-greeter',
      packages=['kano_greeter'],
      scripts=['bin/kano-greeter', 'bin/kano-greeter-account'],
      package_data={'kano_greeter': ['media/css/*']},
      data_files=[
          ('/usr/share/kano-greeter/wallpapers', setuptools.findall('wallpapers')),
          ('/usr/share/xgreeters', ['config/kano-greeter.desktop']),
          ('/var/lib/lightdm', ['config/.kdeskrc'])
      ] + get_locales()
     )
예제 #26
0
파일: setup.py 프로젝트: james54/flask-xxl
        if 'templates' in dn.split('/'):
            for f in fl:
                if not f.endswith('.py'):
                    pkg_data.append(make_file(dn,f))
    return pkg_data

config = dict(
        name='flask-xxl',
        version=get_version(),#'0.0.9',
        include_package_data=True,
        author='Kyle Roux',
        author_email='*****@*****.**',
        description='quick way to design large flask projects',
        long_description=get_description(),
        packages=['flask_xxl'],
        package_data = {'':findall('flask_xxl')},     #['*.bob','*.html','*.js','*.css','*',]},
        install_requires=[
            'flask==0.10.1',
            'flask-alembic==1.0.2',
            'flask-sqlalchemy==2.0',
            'flask-script==2.0.5',
            'flask-WTF==0.10.2',
            'jinja2==2.7.3',
            'LoginUtils==1.0.1',
            'Mako==1.0.0',
            'MarkupSafe==0.23',
            'SQLAlchemy==0.9.8',
            'WTForms==2.0.1',
            'Werkzeug==0.9.6',
            'alembic==0.6.7',
            'argparse==1.2.1',        
예제 #27
0
def find_scripts():
    return [s for s in setuptools.findall("scripts/") if os.path.splitext(s)[1] != ".pyc"]
예제 #28
0
def test_findall_missing_symlink(tmpdir, can_symlink):
    with tmpdir.as_cwd():
        os.symlink('foo', 'bar')
        found = list(setuptools.findall())
        assert found == []
예제 #29
0
def test_findall_curdir(example_source):
    with example_source.as_cwd():
        found = list(setuptools.findall())
    expected = ['readme.txt', os.path.join('foo', 'bar.py')]
    assert found == expected
예제 #30
0
def test_findall(example_source):
    found = list(setuptools.findall(str(example_source)))
    expected = ['readme.txt', 'foo/bar.py']
    expected = [example_source.join(fn) for fn in expected]
    assert found == expected
예제 #31
0
파일: setup.py 프로젝트: jdidion/papers2
def find_scripts(script_dir):
    return [s for s in findall(script_dir) if os.path.splitext(s)[1] != '.pyc']
예제 #32
0
from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages, findall

from version import get_version

def strip_turbion(paths):
    return [p[len('turbion/'):] for p in paths]

setup(
    name = "turbion",
    version = get_version('0.8'),
    packages = find_packages(),

    package_data={
        'turbion': strip_turbion(findall('turbion/locale')) +\
                   strip_turbion(findall('turbion/templates')) +\
                   strip_turbion(findall('turbion/fixtures')) +\

                   strip_turbion(findall('turbion/contrib/openid/templates')) +\
                   strip_turbion(findall('turbion/contrib/feedback/fixtures'))
    },

    author = "Alex Koshelev",
    author_email = "*****@*****.**",
    description = "Flexible django-based blog application",
    license = "New BSD",
    url = "http://turbion.org/",
)
예제 #33
0
파일: setup.py 프로젝트: lukasnellen/indico
 def jsCompress(self):
     from MaKaC.consoleScripts.installBase import jsCompress
     jsCompress()
     self.dataFiles += _generateDataPaths([('htdocs/js/presentation/pack', findall('indico/htdocs/js/presentation/pack'), 35),
                                          ('htdocs/js/indico/pack', findall('indico/htdocs/js/indico/pack'), 29)])
예제 #34
0
#    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/>.


import gettext
import glob
import os
import subprocess
import sys

from setuptools import setup, find_packages, findall


setup(
    name="horizon-billing",
    version="0.0.2",
    license="GNU GPL v3",
    description="Django based interface for billing",
    author="Alessio Ababilov (GridDynamics Openstack Core Team, (c) Grid Dynamics)",
    author_email="*****@*****.**",
    url="http://www.griddynamics.com/openstack",
    packages=find_packages(exclude=["bin", "smoketests", "tests"]),
    package_data={"horizon_billing": [s[len("horizon_billing/") :] for s in findall("horizon_billing/templates")]},
    py_modules=[],
    test_suite="tests",
)
예제 #35
0
cutils = setuptools.Extension('imdb.parser.sql.cutils',
                                ['imdb/parser/sql/cutils.c'])

scripts = ['./bin/get_first_movie.py',
            './bin/get_movie.py', './bin/search_movie.py',
            './bin/get_first_person.py', './bin/get_person.py',
            './bin/search_person.py', './bin/get_character.py',
            './bin/get_first_character.py', './bin/get_company.py',
            './bin/search_character.py', './bin/search_company.py',
            './bin/get_first_company.py', './bin/get_keyword.py',
            './bin/search_keyword.py', './bin/get_top_bottom_movies.py']

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [('doc', setuptools.findall('docs')), ('etc', ['docs/imdbpy.cfg'])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature('compile the C module', standard=True,
        ext_modules=[cutils])

featLxml = setuptools.dist.Feature('add lxml dependency', standard=True,
        install_requires=['lxml'])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
featSQLObject = setuptools.dist.Feature('add SQLObject dependency',
예제 #36
0
파일: setup.py 프로젝트: mdegerne/noVNC
else:
    assert os.path.exists(VFILE), 'version.py does not exist, please set PISTON_VERSION (or run make_version.py for dev purposes)'
    import version as pistonversion
    PISTON_VERSION = pistonversion.VERSION

# Workaround for https://github.com/pypa/pip/issues/288
def snap_symlink(path):
    if not os.path.islink(path):
        return path
    real = os.path.realpath(os.path.normpath(path))
    os.unlink(path)
    shutil.copy(real, path)
    return path

data_files = {}
for p in itertools.chain.from_iterable([setuptools.findall(x) for x in 'images', 'include', 'utils']):
    d, _ = os.path.split(p)
    full = os.path.join(INSTALL_DIR, d)
    data_files[full] = data_files.get(full, [])
    data_files[full].append(snap_symlink(p))

data_files[INSTALL_DIR] = map(snap_symlink, ['vnc.html', 'vnc_auto.html', 'favicon.ico'])

setuptools.setup(name='noVNC',
    zip_safe = False,
    version=PISTON_VERSION,
    description='noVNC is a HTML5 VNC client that runs well in any modern browser including mobile browsers',
    data_files = data_files.items(),
    author='',
    author_email='',
    maintainer='',
예제 #37
0
cutils = setuptools.Extension('imdb.parser.sql.cutils',
                                ['imdb/parser/sql/cutils.c'])

scripts = ['./bin/get_first_movie.py',
            './bin/get_movie.py', './bin/search_movie.py',
            './bin/get_first_person.py', './bin/get_person.py',
            './bin/search_person.py', './bin/get_character.py',
            './bin/get_first_character.py', './bin/get_company.py',
            './bin/search_character.py', './bin/search_company.py',
            './bin/get_first_company.py', './bin/get_keyword.py',
            './bin/search_keyword.py', './bin/get_top_bottom_movies.py']

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [('doc', [f for f in setuptools.findall('docs')
                if '.svn' not in f]), ('etc', ['docs/imdbpy.cfg'])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature('compile the C module', standard=True,
        ext_modules=[cutils])

featLxml = setuptools.dist.Feature('add lxml dependency', standard=True,
        install_requires=['lxml'])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
#!/usr/bin/env python
import os
from setuptools import setup, find_packages, findall

setup(
    name = "openstack_dashboard",
    version = "1.0",
    url = 'https://launchpad.net/openstack-dashboard',
    license = 'Apache 2.0',
    description = "Django based reference implementation of a web based management interface for OpenStack.",
    packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "local"]),
    package_data = {'openstack_dashboard':
                        [s[len('openstack_dashboard/'):] for s in
                        findall('openstack_dashboard/templates') +
                        findall('openstack_dashboard/wsgi') +
                        findall('openstack_dashboard/locale') +
                        findall('openstack_dashboard/static')],
                    },
    data_files = [('/etc/openstack_dashboard/local', findall('local')), ('/var/lib/openstack_dashboard', set())],
    classifiers = [
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
예제 #39
0
from setuptools import setup, find_packages, findall
from distutils.command.build_py import build_py

VERSION = '1.0.0'
""" This file contains information that is used by the bin/buildout process,
to setup and/or refresh a virtual environment for testing.

If you have a new package to be installed, add it to the "install-requires"
list below and it will automatically be installed.  You may need to do
additional work beyond just installing the package, in order for it to be
usable in a virtual environment.
"""
media_files = [
    x.replace('f5test/web/', '') for x in findall('f5test/web/media/')
]

addl_args = dict(
    zip_safe=False,
    cmdclass={'build_py': build_py},
    packages=find_packages(exclude=['tests', 'tests.*']),
    entry_points={
        'console_scripts': [
            'f5.install = f5test.macros.install:main',
            'f5.configurator = f5test.macros.tmosconf.placer:main',
            'f5.vcmp = f5test.macros.tmosconf.placer_vcmp:main',
            'f5.keyswap = f5test.macros.keyswap:main',
            'f5.seleniumrc = f5test.macros.seleniumrc:main',
            'f5.irack = f5test.macros.irackprofile:main',
            'f5.ha = f5test.macros.ha:main',
            'f5.ha_bigiq = f5test.macros.ha_bigiq:main',
            'f5.cloner = f5test.macros.cloner:main',
예제 #40
0
파일: setup.py 프로젝트: davidcox/showboat
def subdir_findall(dir, subdir):
    strip_n = len(dir.split('/'))
    path = '/'.join((dir, subdir))
    return ['/'.join(s.split('/')[strip_n:]) for s in findall(path)]
예제 #41
0
파일: setup.py 프로젝트: x11x/imdbpy
        if arg and not arg.startswith('-'):
            return True
    return False


try:
    if hasCommand():
        languages = runRebuildmo()
    else:
        languages = []
    if languages:
        data_files.append(
            (os.path.join(distutils.sysconfig.get_python_lib(),
                          'imdb/locale'), ['imdb/locale/imdbpy.pot']))
    for lang in languages:
        files_found = setuptools.findall('imdb/locale/%s' % lang)
        if not files_found:
            continue
        base_dir = os.path.dirname(files_found[0])
        data_files.append(
            (os.path.join(distutils.sysconfig.get_python_lib(),
                          'imdb/locale'), ['imdb/locale/imdbpy-%s.po' % lang]))
        if not base_dir:
            continue
        data_files.append((os.path.join(distutils.sysconfig.get_python_lib(),
                                        base_dir), files_found))
except SystemExit:
    print(ERR_MSG)

setuptools.setup(**params)
예제 #42
0
import os
from setuptools import setup, find_packages, findall


def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()


setup(
    name="django-openstack",
    version="0.3",
    url="https://launchpad.net/django-openstack/",
    license="Apache 2.0",
    description="A Django interface for OpenStack.",
    long_description=read("README"),
    author="Devin Carlen",
    author_email="*****@*****.**",
    packages=find_packages(),
    package_data={"django_openstack": [s[len("django_openstack/") :] for s in findall("django_openstack/templates")]},
    install_requires=["setuptools", "mox>=0.5.3", "django_nose"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
    ],
)
예제 #43
0
def test_findall(example_source):
    found = list(setuptools.findall(str(example_source)))
    expected = ['readme.txt', 'foo/bar.py']
    expected = [example_source.join(fn) for fn in expected]
    assert found == expected
예제 #44
0
    keywords=['testing', 'monkey', 'exerciser'],  # arbitrary keywords
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Indicate who your project is intended for
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT 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.7',
    ],
    entry_points={
        'console_scripts': [
            'droidbot=droidbot:start',
        ],
    },
    package_data={
        'droidbot': map(lambda x: os.path.relpath(x, 'droidbot'), findall('droidbot/resources/'))
    },
    # androidviewclient doesnot support pip install, thus you should install it with easy_install
    install_requires=['androguard', 'networkx', 'Pillow', 'wekapy'],
)
예제 #45
0
def test_findall_missing_symlink(tmpdir, can_symlink):
    with tmpdir.as_cwd():
        os.symlink('foo', 'bar')
        found = list(setuptools.findall())
        assert found == []
예제 #46
0
def find_scripts():
    return [
        s for s in setuptools.findall("scripts/")
        if os.path.splitext(s)[1] != ".pyc"
    ]
예제 #47
0
    "./bin/get_person.py",
    "./bin/search_person.py",
    "./bin/get_character.py",
    "./bin/get_first_character.py",
    "./bin/get_company.py",
    "./bin/search_character.py",
    "./bin/search_company.py",
    "./bin/get_first_company.py",
    "./bin/get_keyword.py",
    "./bin/search_keyword.py",
    "./bin/get_top_bottom_movies.py",
]

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [("doc", [f for f in setuptools.findall("docs") if ".svn" not in f]), ("etc", ["docs/imdbpy.cfg"])]


# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature("compile the C module", standard=True, ext_modules=[cutils])

featLxml = setuptools.dist.Feature("add lxml dependency", standard=True, install_requires=["lxml"])

# XXX: it seems there's no way to specify that we need EITHER
#      SQLObject OR SQLAlchemy.
featSQLObject = setuptools.dist.Feature(
    "add SQLObject dependency", standard=True, install_requires=["SQLObject"], require_features="sql"
)
예제 #48
0
def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "horizon",
    version = version.canonical_version_string(),
    url = 'https://github.com/openstack/horizon/',
    license = 'Apache 2.0',
    description = "A Django interface for OpenStack.",
    long_description = read('README'),
    author = 'Devin Carlen',
    author_email = '*****@*****.**',
    packages = find_packages(),
    package_data = {'horizon':
                        [s[len('horizon/'):] for s in
                         findall('horizon/templates') \
                             + findall('horizon/dashboards/nova/templates') \
                             + findall('horizon/dashboards/syspanel/templates') \
                             + findall('horizon/dashboards/settings/templates')]},
    install_requires = [],
    classifiers = [
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
예제 #49
0
파일: setup.py 프로젝트: wendy-king/x7_venv

setup(
    name="steer",
    version=version.canonical_version_string(),
    url="https://github.com/x7/steer/",
    license="Apache 2.0",
    description="A Django interface for X7.",
    long_description=read("README"),
    author="Devin Carlen",
    author_email="*****@*****.**",
    packages=find_packages(),
    package_data={
        "steer": [
            s[len("steer/") :]
            for s in findall("steer/templates")
            + findall("steer/dashboards/engine/templates")
            + findall("steer/dashboards/syspanel/templates")
            + findall("steer/dashboards/settings/templates")
        ]
    },
    install_requires=["setuptools", "mox>=0.5.3", "django_nose"],
    classifiers=[
        "Development Status :: 4 - Beta",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
    ],
import os
from setuptools import setup, find_packages, findall

setup(
    name = "dashboard",
    version = "1.0",
    url = 'https://launchpad.net/openstack-dashboard',
    license = 'Apache 2.0',
    description = "Django based reference implementation of a web based management interface for OpenStack.",
    packages = ['dashboard', 'media'],
    scripts = ['bin/dashboard'],
    package_data = {'dashboard':
                        [s[len('dashboard/'):] for s in
                        findall('dashboard/templates') + findall('dashboard/wsgi') + findall('dashboard/locale')],
                    'media': [s[len('media/'):] for s in findall('media')]
                    },
    data_files = [('/etc/dashboard/local', findall('local')), ('/var/lib/dashboard', set())],
    classifiers = [
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)
예제 #51
0
파일: setup.py 프로젝트: youthhn/nonebot
from setuptools import setup, find_packages, findall

with open('README.md', 'r', encoding='utf-8') as f:
    long_description = f.read()

packages = find_packages(include=('nonebot', 'nonebot.*'))
stub_files = list(filter(lambda x: x.endswith('.pyi'), findall('nonebot')))

setup(
    name='nonebot',
    version='1.3.0',
    url='https://github.com/richardchien/nonebot',
    license='MIT License',
    author='Richard Chien',
    author_email='*****@*****.**',
    description='An asynchronous QQ bot framework based on CoolQ.',
    long_description=long_description,
    long_description_content_type='text/markdown',
    packages=packages,
    data_files=stub_files,
    install_requires=['aiocqhttp>=0.6.7', 'aiocache>=0.10'],
    extras_require={
        'scheduler': ['apscheduler>=1.2'],
    },
    python_requires='>=3.6.1',
    platforms='any',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Framework :: Robot Framework',
        'Framework :: Robot Framework :: Library',
        'License :: OSI Approved :: MIT License',
예제 #52
0
파일: setup.py 프로젝트: Lezval/horizon
from django_openstack import version

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "django-openstack",
    version = version.canonical_version_string(),
    url = 'https://github.com/openstack/horizon/',
    license = 'Apache 2.0',
    description = "A Django interface for OpenStack.",
    long_description = read('README'),
    author = 'Devin Carlen',
    author_email = '*****@*****.**',
    packages = find_packages(),
    package_data = {'django_openstack':
                        [s[len('django_openstack/'):] for s in
                         findall('django_openstack/templates')]},
    install_requires = ['setuptools', 'mox>=0.5.3', 'django_nose'],
    classifiers = [
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
    ]
)

예제 #53
0
def find_scripts():
    return [s for s in setuptools.findall('scripts/') if os.path.splitext(s)[1] != '.pyc']
예제 #54
0
파일: setup.py 프로젝트: imfht/flaskapps
                if not f.endswith('.py'):
                    pkg_data.append(make_file(dn, f))
    return pkg_data


config = dict(
    name='flaskxxl',
    version=get_version(),  #'0.0.9',
    include_package_data=True,
    author='Kyle Roux',
    author_email='*****@*****.**',
    description='quick way to design large flask projects',
    long_description=get_description(),
    long_description_content_type='text/markdown',
    packages=['flask_xxl'],
    package_data={'': findall('flask_xxl')
                  },  #['*.bob','*.html','*.js','*.css','*',]},
    install_requires=[
        'flask>=0.10.1',
        'flask-alembic==1.0.2',
        'flask-sqlalchemy==2.0',
        'flask-script==2.0.5',
        'flask-WTF==0.10.2',
        'jinja2==2.7.3',
        'LoginUtils==1.0.1',
        'Mako==1.0.0',
        'MarkupSafe==0.23',
        'SQLAlchemy==0.9.8',
        'WTForms==2.0.1',
        'Werkzeug==0.15.3',
        'alembic==0.6.7',
예제 #55
0
cutils = setuptools.Extension('imdb.parser.sql.cutils',
                              ['imdb/parser/sql/cutils.c'])

scripts = [
    './bin/get_first_movie.py', './bin/get_movie.py', './bin/search_movie.py',
    './bin/get_first_person.py', './bin/get_person.py',
    './bin/search_person.py', './bin/get_character.py',
    './bin/get_first_character.py', './bin/get_company.py',
    './bin/search_character.py', './bin/search_company.py',
    './bin/get_first_company.py', './bin/get_keyword.py',
    './bin/search_keyword.py', './bin/get_top_bottom_movies.py'
]

# XXX: I'm not sure that 'etc' is a good idea.  Making it an absolute
#      path seems a recipe for a disaster (with bdist_egg, at least).
data_files = [('doc', setuptools.findall('docs')),
              ('etc', ['docs/imdbpy.cfg'])]

# Defining these 'features', it's possible to run commands like:
# python ./setup.py --without-sql bdist
# having (in this example) imdb.parser.sql removed.

featCutils = setuptools.dist.Feature('compile the C module',
                                     standard=True,
                                     ext_modules=[cutils])

featLxml = setuptools.dist.Feature('add lxml dependency',
                                   standard=True,
                                   install_requires=['lxml'])

# XXX: it seems there's no way to specify that we need EITHER
예제 #56
0
파일: setup.py 프로젝트: petry/django-press
        elif re.match(r'\s*-f\s+', line):
            pass
        else:
            requirements.append(line)
    return requirements


def not_py(file_path):
    return not (file_path.endswith('.py') or file_path.endswith('.pyc'))


core_packages = find_packages()
core_package_data = {}
for package in core_packages:
    package_path = package.replace('.', '/')
    core_package_data[package] = filter(not_py, findall(package_path))
setup(
    name='django-press',
    version=version,
    description='',
    long_description=open('README.rst').read(),
    author='Marcos Daniel Petry',
    author_email='*****@*****.**',
    url='https://github.com/petry/django-press',
    license='BSD',
    packages=core_packages,
    package_data=core_package_data,
    include_package_data=True,
    zip_safe=True,
    classifiers=[
        'Development Status :: 4 - Beta',
예제 #57
0
def find_modules(dir=os.curdir):
    return [x for x in findall(dir) if os.path.splitext(x)[1] == '.py']
예제 #58
0
    keywords=['testing', 'monkey', 'exerciser'],  # arbitrary keywords
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Indicate who your project is intended for
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Testing',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: MIT 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',
    ],
    entry_points={
        'console_scripts': [
            'droidbot=droidbot.start:main',
        ],
    },
    package_data={
        'droidbot': [os.path.relpath(x, 'droidbot') for x in findall('droidbot/resources/')]
    },
    # androidviewclient doesnot support pip install, thus you should install it with easy_install
    install_requires=['androguard', 'networkx', 'Pillow'],
)