def find_packages(where='.', exclude=(), invalidate_cache=False): """ This version of ``find_packages`` caches previous results to speed up subsequent calls. Use ``invalide_cache=True`` to ignore cached results from previous ``find_packages`` calls, and repeat the package search. """ if exclude: warnings.warn( "Use of the exclude parameter is no longer supported since it does " "not work as expected. Use add_exclude_packages instead. Note that " "it must be called prior to any other calls from setup helpers.", AstropyDeprecationWarning) # Calling add_exclude_packages after this point will have no effect _module_state['excludes_too_late'] = True if not invalidate_cache and _module_state['package_cache'] is not None: return _module_state['package_cache'] packages = _find_packages(where=where, exclude=list(_module_state['exclude_packages'])) _module_state['package_cache'] = packages return packages
def find_packages(where='.', exclude=(), invalidate_cache=False): """ This version of ``find_packages`` caches previous results to speed up subsequent calls. Use ``invalide_cache=True`` to ignore cached results from previous ``find_packages`` calls, and repeat the package search. """ if exclude: warnings.warn( "Use of the exclude parameter is no longer supported since it does " "not work as expected. Use add_exclude_packages instead. Note that " "it must be called prior to any other calls from setup helpers.", AstropyDeprecationWarning) # Calling add_exclude_packages after this point will have no effect _module_state['excludes_too_late'] = True if not invalidate_cache and _module_state['package_cache'] is not None: return _module_state['package_cache'] packages = _find_packages( where=where, exclude=list(_module_state['exclude_packages'])) _module_state['package_cache'] = packages return packages
def find_packages(where='.', exclude=(), invalidate_cache=False): """ This version of ``find_packages`` caches previous results to speed up subsequent calls. Use ``invalide_cache=True`` to ignore cached results from previous ``find_packages`` calls, and repeat the package search. """ if not invalidate_cache and _module_state['package_cache'] is not None: return _module_state['package_cache'] packages = _find_packages(where=where, exclude=exclude) _module_state['package_cache'] = packages return packages
def setup(): _setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description=PACKAGE_DESCRIPTION, long_description=PACKAGE_LONG_DESCRIPTION, long_description_content_type="text/markdown", url=PACKAGE_URL, author="Lei Ma", author_email="*****@*****.**", license="MIT", packages=_find_packages(exclude=("tests", )), install_requires=_requirements(), include_package_data=True, extras_require={"docs": ["sphinx>=2.4.1", "sphinx-rtd-theme>=0.4.3"]}, entry_points={ "console_scripts": ["dataherb=dataherb.command:dataherb"] }, test_suite="nose.collector", tests_require=["nose"], zip_safe=False, )
'main' if isinstance(script, basestring) else script[1]) for cmd, script in STD_SCRIPTS_PKG_COMMANDS.items()} ENTRY_POINTS = {'console_scripts': ['{} = {}'.format(name, funcpath) for name, funcpath in COMMANDS.items()]} if __name__ == '__main__': _setup(name=NAME, version=VERSION, url=SITE_URI, download_url=DOWNLOAD_URI, description=DESCRIPTION, long_description=LONG_DESCRIPTION, author=', '.join(__credits__), maintainer=__maintainer__, maintainer_email=__email__, license=LICENSE, classifiers=TROVE_CLASSIFIERS, setup_requires=SETUP_DEPS, install_requires=INSTALL_DEPS, extras_require=EXTRAS_DEPS, tests_require=TESTS_DEPS, dependency_links=DEPS_SEARCH_URIS, namespace_packages=NAMESPACE_PKGS, packages=_find_packages(), test_suite=TESTS_PKG, include_package_data=True, entry_points=ENTRY_POINTS)
return [r for r in open("requirements.txt")] def setup(): _setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description=PACKAGE_DESCRIPTION, long_description=PACKAGE_LONG_DESCRIPTION, long_description_content_type="text/markdown", url=PACKAGE_URL, author="Lei Ma", author_email="*****@*****.**", license="MIT", packages=_find_packages(exclude=("tests", )), install_requires=_requirements(), include_package_data=True, extras_require={"docs": ["sphinx>=2.4.1", "sphinx-rtd-theme>=0.4.3"]}, entry_points={ "console_scripts": ["dataherb=dataherb.command:dataherb"] }, test_suite="nose.collector", tests_require=["nose"], zip_safe=False, ) if __name__ == "__main__": setup() print("Packages: ", _find_packages(exclude=("tests", )))
def find_packages(namespace): return ['%s.%s' % (namespace, pkg) for pkg in _find_packages(namespace)]
} ENTRY_POINTS = { 'console_scripts': ['{} = {}'.format(name, funcpath) for name, funcpath in COMMANDS.items()], 'rdf.plugins.store': ('rdb2rdf_dm = rdb2rdf.stores:DirectMapping', ), } if __name__ == '__main__': _setup(name=NAME, version=VERSION, url=SITE_URI, download_url=DOWNLOAD_URI, description=DESCRIPTION, long_description=LONG_DESCRIPTION, author=', '.join(__credits__), maintainer=__maintainer__, maintainer_email=__email__, license=LICENSE, classifiers=TROVE_CLASSIFIERS, setup_requires=SETUP_DEPS, install_requires=INSTALL_DEPS, extras_require=EXTRAS_DEPS, tests_require=TESTS_DEPS, dependency_links=DEPS_SEARCH_URIS, namespace_packages=NAMESPACE_PKGS_NAMES, packages=_find_packages(), test_suite=TESTS_PKG_NAME, include_package_data=True, entry_points=ENTRY_POINTS)